Ignore:
Timestamp:
Jun 29, 2016, 3:40:46 PM (8 years ago)
Author:
djay
Message:

Give the capability to store the main.cfg file in sysconfdir and the services in servicePath if defined in the [main] section.

File:
1 edited

Legend:

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

    r781 r784  
    15461546       * Else fallback to the initial method using the xml file to write in ...
    15471547       */
    1548       char ntmp[1024];
    1549 #ifndef WIN32
    1550       getcwd(ntmp,1024);
    1551 #else
    1552       _getcwd(ntmp,1024);
    1553 #endif
     1548      map* cwdMap=getMapFromMaps(m,"main","servicePath");
    15541549      struct stat myFileInfo;
    15551550      int statRes;
    15561551      char file_path[1024];
    1557       sprintf(file_path,"%s/GetStatus.zcfg",ntmp);
     1552      if(cwdMap!=NULL){
     1553        sprintf(file_path,"%s/GetStatus.zcfg",cwdMap->value);
     1554      }else{
     1555        char ntmp[1024];
     1556#ifndef WIN32
     1557        getcwd(ntmp,1024);
     1558#else
     1559        _getcwd(ntmp,1024);
     1560#endif
     1561        sprintf(file_path,"%s/GetStatus.zcfg",ntmp);
     1562      }
     1563      fprintf(stderr,"%s \n",file_path);
    15581564      statRes=stat(file_path,&myFileInfo);
    15591565      if(statRes==0){
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