- Timestamp:
- Aug 31, 2017, 4:14:46 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/prototype-v0/zoo-project/zoo-kernel/zoo_service_loader.c
r850 r851 2269 2269 _tmpMaps = createMaps("renv"); 2270 2270 for (; s; ei++) { 2271 int len=strlen(s); 2272 char* tmpName=zStrdup(s); 2273 char* tmpValue=strstr(s,"=")+1; 2274 char* tmpName1=(char*)malloc((1+(len-strlen(tmpValue)))*sizeof(char)); 2275 snprintf(tmpName1,(len-strlen(tmpValue))+1,"%s",tmpName); 2276 if(_tmpMaps->content == NULL) 2277 _tmpMaps->content = createMap (tmpName1,tmpValue); 2278 else 2279 addToMap (_tmpMaps->content,tmpName1,tmpValue); 2280 free(tmpName); 2281 free(tmpName1); 2271 if(strstr(s,"=")!=NULL && strlen(strstr(s,"="))>1){ 2272 int len=strlen(s); 2273 char* tmpName=zStrdup(s); 2274 char* tmpValue=strstr(s,"=")+1; 2275 char* tmpName1=(char*)malloc((1+(len-strlen(tmpValue)))*sizeof(char)); 2276 snprintf(tmpName1,(len-strlen(tmpValue))+1,"%s",tmpName); 2277 if(_tmpMaps->content == NULL) 2278 _tmpMaps->content = createMap (tmpName1,tmpValue); 2279 else 2280 addToMap (_tmpMaps->content,tmpName1,tmpValue); 2281 free(tmpName1); 2282 free(tmpName); 2283 } 2282 2284 s = *(orig+ei); 2283 2285 } … … 2353 2355 loadServiceAndRun (&m, s1, request_inputs, &request_input_real_format, 2354 2356 &request_output_real_format, &eres); 2357 #ifdef RELY_ON_DB 2358 #ifdef META_DB 2359 close_sql(m,1); 2360 //end_sql(); 2361 #endif 2362 close_sql(m,0); 2363 #endif 2355 2364 } 2356 2365 else … … 2586 2595 if (((int) getpid ()) != cpid || cgiSid != NULL) 2587 2596 { 2597 fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__); 2598 fflush(stderr); 2599 invokeCallback(m,NULL,request_output_real_format,5,1); 2600 fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__); 2601 fflush(stderr); 2602 2588 2603 fclose (stdout); 2589 2604 … … 2611 2626 recordResponse(m,fbkp1); 2612 2627 fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__); 2613 invokeCallback(m,NULL,request_output_real_format, 5,1);2628 invokeCallback(m,NULL,request_output_real_format,6,0); 2614 2629 fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__); 2615 2630 #endif … … 2617 2632 free(bmap); 2618 2633 unlink (fbkp1); 2634 unhandleStatus (m); 2635 #ifdef RELY_ON_DB 2636 #ifdef META_DB 2637 cleanupCallbackThreads(); 2638 close_sql(m,1); 2639 //end_sql(); 2640 #endif 2641 close_sql(m,0); 2642 #endif 2619 2643 unlink (flog); 2620 unhandleStatus (m);2621 #ifdef META_DB2622 close_sql(m,0);2623 //end_sql();2624 #endif2625 2644 free(fbkpid); 2626 2645 free(fbkpres); … … 2630 2649 if(cgiSid!=NULL) 2631 2650 free(cgiSid); 2632 //InternetCloseHandle (&hInternet); 2651 //InternetCloseHandle (&hInternet); 2633 2652 fprintf (stderr, "RUN IN BACKGROUND MODE %s %d \n",__FILE__,__LINE__); 2634 2653 fflush(stderr);
Note: See TracChangeset
for help on using the changeset viewer.