Changeset 32 for trunk/zoo-services


Ignore:
Timestamp:
Sep 27, 2010, 10:09:32 PM (14 years ago)
Author:
djay
Message:

Add missing updated code from 26 ...

Location:
trunk/zoo-services
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-services/ogr/base-vect-ops/service.c

    r26 r32  
    246246   OGRGeometryH geometry,res;
    247247   map* tmp=getMapFromMaps(inputs,"InputPolygon","value");
    248    if(tmp==NULL)
     248   if(tmp==NULL){
     249     setMapInMaps(conf,"lenv","message","Unable to fetch input geometry");
    249250     return SERVICE_FAILED;
     251   }else
     252     if(strlen(tmp->value)<=0){
     253       setMapInMaps(conf,"lenv","message","Unable to fetch input geometry");
     254       return SERVICE_FAILED;
     255     }
    250256   map* tmp1=getMapFromMaps(inputs,"InputPolygon","mimeType");
    251257   if(strncmp(tmp1->value,"application/json",16)==0)
  • trunk/zoo-services/utils/status/service.c

    r26 r32  
    6464    DIR *dirp = opendir(tmpTmap->value);
    6565    char fileName[1024],xslFileName[1024];
     66    int hasFile=-1;
    6667    if(dirp!=NULL){
    6768      char tmp[128];
    6869      sprintf(tmp,"_%s.xml",tmpMap->value);
    6970      while ((dp = readdir(dirp)) != NULL)
    70         if(strstr(dp->d_name,tmp)!=0)
     71        if(strstr(dp->d_name,tmp)!=0){
    7172          sprintf(fileName,"%s/%s",tmpTmap->value,dp->d_name);
    72     }else{ 
    73       setMapInMaps(conf,"lenv","message","GetStatus was unable to use the tmpPath value set in main.cfg file.");
     73          hasFile=1;
     74        }
     75    }else{
     76      char tmp[1024];
     77      snprintf(tmp,1024,"GetStatus was unable to use the tmpPath value set in main.cfg file as directory %s.",tmpTmap->value);
     78      setMapInMaps(conf,"lenv","message",tmp);
     79      return SERVICE_FAILED;
     80    }
     81    if(hasFile<0){
     82      char tmp[1024];
     83      snprintf(tmp,1024,"GetStatus was unable to find any cache file for Service ID %s.",tmpMap->value);
     84      setMapInMaps(conf,"lenv","message",tmp);
    7485      return SERVICE_FAILED;
    7586    }
     
    94105      xmlFree(xmlbuff);
    95106    }
    96     else{   
     107    else{
    97108      char tmp[1024];
    98       sprintf(tmp,"ZOO GetStatus Service was unable to find or parse the cache xml file available for the Service ID %s.",tmpMap->value);
     109      sprintf(tmp,"ZOO GetStatus Service was unable to parse the cache xml file available for the Service ID %s.",tmpMap->value);
    99110      setMapInMaps(conf,"lenv","message",tmp);
    100111      return SERVICE_FAILED;
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