Ignore:
Timestamp:
Oct 27, 2014, 4:46:05 PM (10 years ago)
Author:
djay
Message:

Use unique identifier as reference for asynchronous service execution.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/zoo_service_loader.c

    r510 r514  
    25042504  _tmpMaps->name=zStrdup("lenv");
    25052505  char tmpBuff[100];
    2506   sprintf(tmpBuff,"%i",(cpid+(int)time(NULL)));
     2506  int lid=getShmLockId(NULL,1);
     2507  lockShm(lid);
     2508  struct ztimeval tp;
     2509  if(zGettimeofday(&tp,NULL)==0)
     2510    sprintf(tmpBuff,"%i",(cpid+((int)tp.tv_sec+(int)tp.tv_usec)));
     2511  else
     2512    sprintf(tmpBuff,"%i",(cpid+(int)time(NULL)));
     2513  unlockShm(lid);
     2514  removeShmLock(NULL,1);
    25072515  _tmpMaps->content=createMap("usid",tmpBuff);
    25082516  _tmpMaps->next=NULL;
     
    25752583  freeMaps(&_tmpMaps);
    25762584  free(_tmpMaps);
    2577  
     2585
    25782586#ifdef DEBUG
    25792587  dumpMap(request_inputs);
     
    26342642      zSleep(1);
    26352643#endif
     2644      r_inputs=getMapFromMaps(m,"lenv","usid");
     2645      int cpid=atoi(r_inputs->value);
    26362646      r_inputs=getMapFromMaps(m,"main","tmpPath");
    26372647      map* r_inputs1=getMap(s1->content,"ServiceProvider");
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png