Changeset 682 for trunk/zoo-project/zoo-kernel/response_print.c
- Timestamp:
- Jun 26, 2015, 2:07:46 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/response_print.c
r680 r682 1745 1745 } 1746 1746 1747 if(vid==0 && hasStoredExecuteResponse==true && status!=SERVICE_STARTED && status!=SERVICE_ACCEPTED){ 1747 if(vid==0 && 1748 hasStoredExecuteResponse==true 1749 && status!=SERVICE_STARTED 1750 #ifndef WIN32 1751 && status!=SERVICE_ACCEPTED 1752 #endif 1753 ){ 1748 1754 #ifndef RELY_ON_DB 1749 1755 semid lid=acquireLock(m);//,1); … … 2334 2340 map* version=getMapFromMaps(m,"main","rversion"); 2335 2341 int vid=getVersionId(version->value); 2336 2342 2337 2343 maps* tmpSess=getMaps(m,"senv"); 2338 2344 if(tmpSess!=NULL){ … … 2375 2381 else{ 2376 2382 fclose(teste); 2377 dumpMapsToFile(tmpSess,session_file_path );2383 dumpMapsToFile(tmpSess,session_file_path,1); 2378 2384 } 2379 2385 } … … 2441 2447 elements* in=getElements(s->outputs,tmpI->name); 2442 2448 char *format=NULL; 2443 if(in!=NULL ){2444 format= strdup(in->format);2449 if(in!=NULL && in->format!=NULL){ 2450 format=zStrdup(in->format); 2445 2451 }else 2446 format= strdup("LiteralData");2452 format=zStrdup("LiteralData"); 2447 2453 if(strcasecmp(format,"BoundingBoxData")==0){ 2448 2454 addToMap(tmpI->content,"extension","xml"); … … 2466 2472 getFileExtension(mtype != NULL ? mtype->value : NULL, file_ext, 32); 2467 2473 } 2468 2474 2469 2475 file_name=(char*)malloc((strlen(s->name)+strlen(usid->value)+strlen(file_ext)+strlen(tmpI->name)+45)*sizeof(char)); 2470 2476 sprintf(file_name,"%s_%s_%s_%d.%s",s->name,tmpI->name,usid->value,itn,file_ext); … … 2472 2478 file_path=(char*)malloc((strlen(tmp1->value)+strlen(file_name)+2)*sizeof(char)); 2473 2479 sprintf(file_path,"%s/%s",tmp1->value,file_name); 2474 2480 2475 2481 FILE *ofile=fopen(file_path,"wb"); 2476 2482 if(ofile==NULL){ … … 2498 2504 2499 2505 } 2506 2500 2507 map *tmp2=getMapFromMaps(m,"main","tmpUrl"); 2501 2508 map *tmp3=getMapFromMaps(m,"main","serverAddress"); … … 2509 2516 sprintf(file_url,"%s/%s/%s",tmp3->value,tmp2->value,file_name); 2510 2517 } 2518 2511 2519 addToMap(tmpI->content,"Reference",file_url); 2512 2520 free(format); 2513 2521 free(file_name); 2514 free(file_url); 2522 free(file_url); 2515 2523 2516 2524 }
Note: See TracChangeset
for help on using the changeset viewer.