Changes in trunk/zoo-kernel/service_internal_js.c [26:9]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-kernel/service_internal_js.c
r26 r9 23 23 */ 24 24 25 #include "service_internal .h"25 #include "service_internal_js.h" 26 26 27 27 static char dbg[1024]; … … 74 74 if (!JS_DefineFunction(cx, global, "ZOORequest", JSRequest, 4, 0)) 75 75 return 1; 76 if (!JS_DefineFunction(cx, global, "ZOOUpdateStatus", JSUpdateStatus, 2, 0))77 return 1;78 76 79 77 /* Your application code here. This may include JSAPI calls … … 84 82 map* tmpm1=getMap(request,"metapath"); 85 83 map* tmpm2=getMap(s->content,"serviceProvider"); 84 char filename[strlen(tmpm1->value)+strlen(tmpm2->value)+6]; 86 85 char ntmp[1024]; 87 86 getcwd(ntmp,1024); 88 char filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+2];89 87 sprintf(filename,"%s/%s%s",ntmp,tmpm1->value,tmpm2->value); 90 filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+1]=0;91 fprintf(stderr,"FILENAME %s\n",filename);92 88 struct stat file_status; 93 89 stat(filename, &file_status); … … 207 203 208 204 /* Cleanup. */ 205 // The JS_MaybeGC call imply segmentation fault 206 //JS_MaybeGC(cx); 209 207 JS_DestroyScript(cx, script); 210 JS_MaybeGC(cx);211 208 // If we use the DestroyContext as requested to release memory then we get 212 209 // issue getting back the main configuration maps after coming back to the … … 390 387 #endif 391 388 if(res!=NULL){ 392 #ifdef JS_DEBUG393 389 fprintf(stderr,"%s - %s\n",JS_GetStringBytes(jsmsg),JS_GetStringBytes(jsmsg1)); 394 #endif395 390 addToMap(res,JS_GetStringBytes(jsmsg),JS_GetStringBytes(jsmsg1)); 396 391 } … … 399 394 res->next=NULL; 400 395 } 401 #ifdef JS_DEBUG402 396 dumpMap(res); 403 #endif404 397 } 405 398 }
Note: See TracChangeset
for help on using the changeset viewer.