Ignore:
Timestamp:
Mar 31, 2014, 10:50:26 PM (8 years ago)
Author:
djay
Message:

Fix some issue in background execution on windows platform (basic array and xlink). Fix issue #89.

File:
1 edited

Legend:

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

    r453 r458  
    923923    if(strncasecmp(mime->value,"application/json",16)==0)
    924924      ext="json";
    925  
     925
    926926  map* tmpMap=getMapFromMaps(conf,"main","dataPath");
    927927  map* sidMap=getMapFromMaps(conf,"lenv","usid");
    928928  char *pszDataSource=(char*)malloc((strlen(tmpMap->value)+strlen(sidMap->value)+strlen(outputs->name)+17)*sizeof(char));
    929   sprintf(pszDataSource,"%s/ZOO_DATA_%s_%s.%s",tmpMap->value,outputs->name,sidMap->value,ext);
    930   int f=open(pszDataSource,O_WRONLY|O_CREAT,S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
     929  sprintf(pszDataSource,"%s/ZOO_DATA_%s_%s.%s",tmpMap->value,outputs->name,sidMap->value,ext); 
     930  int f=zOpen(pszDataSource,O_WRONLY|O_CREAT,S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
    931931  map* sizeMap=getMap(outputs->content,"size");
    932932  map* vData=getMap(outputs->content,"value");
    933933  if(sizeMap!=NULL){
    934     write(f,vData->value,atoi(sizeMap->value)*sizeof(char));
     934    zWrite(f,vData->value,atoi(sizeMap->value)*sizeof(char));
    935935  }
    936936  else{
    937     write(f,vData->value,strlen(vData->value)*sizeof(char));
     937    zWrite(f,vData->value,(strlen(vData->value)+1)*sizeof(char));
    938938  }
    939939  close(f);
    940   //exit(-1);
    941940  addToMap(outputs->content,"storage",pszDataSource);
    942941
     
    10901089  map* sid=getMapFromMaps(conf,"lenv","usid");
    10911090  char *mapPath=
    1092     (char*)malloc((16+strlen(outputs->name)+strlen(tmp1->value))*sizeof(char));
     1091    (char*)malloc((7+strlen(sid->value)+strlen(outputs->name)+strlen(tmp1->value))*sizeof(char));
    10931092  sprintf(mapPath,"%s/%s_%s.map",tmp1->value,outputs->name,sid->value);
    10941093  msSaveMap(myMap,mapPath);
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