Changeset 32 for trunk/zoo-services/utils
- Timestamp:
- Sep 27, 2010, 10:09:32 PM (14 years ago)
- Location:
- trunk/zoo-services/utils/status
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-services/utils/status/service.c
r26 r32 64 64 DIR *dirp = opendir(tmpTmap->value); 65 65 char fileName[1024],xslFileName[1024]; 66 int hasFile=-1; 66 67 if(dirp!=NULL){ 67 68 char tmp[128]; 68 69 sprintf(tmp,"_%s.xml",tmpMap->value); 69 70 while ((dp = readdir(dirp)) != NULL) 70 if(strstr(dp->d_name,tmp)!=0) 71 if(strstr(dp->d_name,tmp)!=0){ 71 72 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); 74 85 return SERVICE_FAILED; 75 86 } … … 94 105 xmlFree(xmlbuff); 95 106 } 96 else{ 107 else{ 97 108 char tmp[1024]; 98 sprintf(tmp,"ZOO GetStatus Service was unable to find orparse 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); 99 110 setMapInMaps(conf,"lenv","message",tmp); 100 111 return SERVICE_FAILED;
Note: See TracChangeset
for help on using the changeset viewer.