Changeset 785
- Timestamp:
- Jul 17, 2016, 12:41:09 PM (8 years ago)
- Location:
- trunk/zoo-project/zoo-kernel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/response_print.c
r784 r785 757 757 char* ckey=level->value; 758 758 if(strncasecmp(level->value,"profile",7)==0) 759 ckey= "generic";759 ckey=(char*)"generic"; 760 760 if(strncasecmp(level->value,"generic",7)==0) 761 ckey= "concept";761 ckey=(char*)"concept"; 762 762 service* inherited=getServiceFromRegistry(reg,ckey,tmp1->value); 763 763 if(inherited!=NULL){ … … 1537 1537 memset(url,0,1024); 1538 1538 maps* tmp_maps=getMaps(m,"main"); 1539 if(tmp_maps!=NULL ){1539 if(tmp_maps!=NULL && tmp_maps->content!=NULL){ 1540 1540 map* tmpm1=getMap(tmp_maps->content,"serverAddress"); 1541 1541 /** … … 1561 1561 sprintf(file_path,"%s/GetStatus.zcfg",ntmp); 1562 1562 } 1563 fprintf(stderr,"%s \n",file_path);1564 1563 statRes=stat(file_path,&myFileInfo); 1565 1564 if(statRes==0){ … … 1761 1760 xmlAddChild(n,nc); 1762 1761 } 1763 1762 1764 1763 if(vid==0 && 1765 1764 hasStoredExecuteResponse==true … … 1965 1964 if(tmpMap==NULL){ 1966 1965 nc2=xmlNewNode(ns_wps, BAD_CAST "Data"); 1967 if(e!=NULL ){1966 if(e!=NULL && e->format!=NULL){ 1968 1967 if(strncasecmp(e->format,"LiteralOutput",strlen(e->format))==0) 1969 1968 nc3=xmlNewNode(ns_wps, BAD_CAST "LiteralData"); … … 2425 2424 map *usid=getMapFromMaps(m,"lenv","usid"); 2426 2425 addToMap(statusInfo,"JobID",usid->value); 2427 printStatusInfo(m,statusInfo, "Execute");2426 printStatusInfo(m,statusInfo,(char*)"Execute"); 2428 2427 freeMap(&statusInfo); 2429 2428 free(statusInfo); … … 2451 2450 gfile=getMap(tmpI->content,"generated_file"); 2452 2451 } 2453 readGeneratedFile(m,tmpI->content,gfile->value); 2454 file_name=(char*)malloc((strlen(gfile->value)+strlen(tmp1->value)+1)*sizeof(char)); 2455 for(int i=0;i<strlen(gfile->value);i++) 2456 file_name[i]=gfile->value[i+strlen(tmp1->value)]; 2452 readGeneratedFile(m,tmpI->content,gfile->value); 2453 file_name=zStrdup((gfile->value)+strlen(tmp1->value)); 2457 2454 } 2458 2455 … … 2467 2464 char *format=NULL; 2468 2465 if(in!=NULL && in->format!=NULL){ 2469 format= zStrdup(in->format);2466 format=in->format; 2470 2467 }else 2471 format= zStrdup("LiteralData");2472 if( strcasecmp(format,"BoundingBoxData")==0){2468 format=(char*)"LiteralData"; 2469 if(format!=NULL && strcasecmp(format,"BoundingBoxData")==0){ 2473 2470 addToMap(tmpI->content,"extension","xml"); 2474 2471 addToMap(tmpI->content,"mimeType","text/xml"); … … 2535 2532 sprintf(file_url,"%s/%s/%s",tmp3->value,tmp2->value,file_name); 2536 2533 } 2537 2538 2534 addToMap(tmpI->content,"Reference",file_url); 2539 free(format);2540 2535 free(file_name); 2541 2536 free(file_url); -
trunk/zoo-project/zoo-kernel/response_print.h
r767 r785 136 136 * Definitions of acceptable final status 137 137 */ 138 static char wpsStatus[ 2][11]={138 static char wpsStatus[3][11]={ 139 139 "Succeeded", 140 "Failed" 140 "Failed", 141 "Running" 141 142 }; 142 143 /** -
trunk/zoo-project/zoo-kernel/server_internal.c
r781 r785 251 251 }else{ 252 252 if(tmp!=NULL){ 253 tmp1= =zStrdup(tmp);253 tmp1=zStrdup(tmp); 254 254 free(tmp); 255 255 }else{ 256 256 if(tmp0!=NULL){ 257 tmp1= =zStrdup(tmp0);257 tmp1=zStrdup(tmp0); 258 258 free(tmp0); 259 259 } -
trunk/zoo-project/zoo-kernel/sqlapi.c
r784 r785 27 27 #include "ogrsf_frmts.h" 28 28 #include "ogr_p.h" 29 #include "response_print.h" 29 30 #if GDAL_VERSION_MAJOR >= 2 30 31 #include <gdal_priv.h> … … 219 220 strlen(uusid->value)+ 220 221 strlen(osid->value)+ 221 strlen(sid->value)+56+1)*sizeof(char)); 222 strlen(sid->value)+ 223 strlen(wpsStatus[2])+66+1)*sizeof(char)); 222 224 sprintf(sqlQuery, 223 "INSERT INTO %s.services (uuid,sid,osid )"224 "VALUES ('%s','%s','%s' );",225 "INSERT INTO %s.services (uuid,sid,osid,fstate)" 226 "VALUES ('%s','%s','%s','%s');", 225 227 schema->value, 226 uusid->value,sid->value,osid->value); 228 uusid->value, 229 sid->value, 230 osid->value, 231 wpsStatus[2]); 227 232 execSql(conf,sqlQuery); 228 233 free(sqlQuery);
Note: See TracChangeset
for help on using the changeset viewer.