Changeset 72 for trunk/zoo-kernel/service_internal.c
- Timestamp:
- Jan 13, 2011, 5:36:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-kernel/service_internal.c
r71 r72 2 2 * Author : Gérald FENOY 3 3 * 4 * Copyright (c) 2009-201 0GeoLabs SARL4 * Copyright (c) 2009-2011 GeoLabs SARL 5 5 * 6 6 * Permission is hereby granted, free of charge, to any person obtaining a copy … … 1048 1048 char tmp[256]; 1049 1049 char url[1024]; 1050 char stored_path[1024]; 1050 1051 memset(tmp,0,256); 1051 memset(url,0,256); 1052 memset(url,0,1024); 1053 memset(stored_path,0,1024); 1052 1054 maps* tmp_maps=getMaps(m,"main"); 1053 1055 if(tmp_maps!=NULL){ … … 1099 1101 if(tmpm1!=NULL) 1100 1102 sprintf(tmp,"%s/",tmpm1->value); 1101 } 1103 tmpm1=getMapFromMaps(m,"main","TmpPath"); 1104 sprintf(stored_path,"%s/%s_%i.xml",tmpm1->value,service,pid); 1105 } 1106 1107 1102 1108 1103 1109 xmlNewProp(n,BAD_CAST "serviceInstance",BAD_CAST tmp); 1104 if(status!=SERVICE_SUCCEEDED && status!=SERVICE_FAILED){ 1110 map* test=getMap(request,"storeExecuteResponse"); 1111 bool hasStoredExecuteResponse=false; 1112 if(test!=NULL && strcasecmp(test->value,"true")==0){ 1105 1113 xmlNewProp(n,BAD_CAST "statusLocation",BAD_CAST url); 1114 hasStoredExecuteResponse=true; 1106 1115 } 1107 1116 … … 1236 1245 #endif 1237 1246 xmlDocSetRootElement(doc, n); 1247 if(hasStoredExecuteResponse){ 1248 /* We need to write the ExecuteResponse Document somewhere */ 1249 FILE* output=fopen(stored_path,"w"); 1250 xmlChar *xmlbuff; 1251 int buffersize; 1252 xmlDocDumpFormatMemoryEnc(doc, &xmlbuff, &buffersize, "UTF-8", 1); 1253 fwrite(xmlbuff,1,strlen(xmlbuff)*sizeof(char),output); 1254 xmlFree(xmlbuff); 1255 fclose(output); 1256 } 1238 1257 printDocument(m,doc,pid); 1239 1258
Note: See TracChangeset
for help on using the changeset viewer.