Changeset 329 for trunk/zoo-project/zoo-kernel
- Timestamp:
- Aug 29, 2011, 11:01:40 PM (13 years ago)
- Location:
- trunk/zoo-project/zoo-kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_internal_js.c
r328 r329 103 103 * Load the first part of the ZOO-API 104 104 */ 105 char api0[strlen(tmpm1->value)+strlen(ntmp)+1 5];106 sprintf(api0,"%s/%s ZOO-proj4js.js",ntmp,tmpm1->value);105 char api0[strlen(tmpm1->value)+strlen(ntmp)+16]; 106 sprintf(api0,"%s/%s/ZOO-proj4js.js",ntmp,tmpm1->value); 107 107 #ifdef JS_DEBUG 108 108 fprintf(stderr,"Trying to load %s\n",api0); … … 112 112 113 113 char api1[strlen(tmpm1->value)+strlen(ntmp)+11]; 114 sprintf(api1,"%s/%s ZOO-api.js",ntmp,tmpm1->value);114 sprintf(api1,"%s/%s/ZOO-api.js",ntmp,tmpm1->value); 115 115 #ifdef JS_DEBUG 116 116 fprintf(stderr,"Trying to load %s\n",api1); … … 126 126 map* tmpm2=getMap(s->content,"serviceProvider"); 127 127 128 char filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+ 2];129 sprintf(filename,"%s/%s %s",ntmp,tmpm1->value,tmpm2->value);130 filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+ 1]=0;128 char filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+3]; 129 sprintf(filename,"%s/%s/%s",ntmp,tmpm1->value,tmpm2->value); 130 filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+2]=0; 131 131 #ifdef JS_DEBUG 132 132 fprintf(stderr,"FILENAME %s\n",filename); -
trunk/zoo-project/zoo-kernel/zoo_loader.c
r296 r329 282 282 xmlCleanupParser(); 283 283 } 284 285 char *token,*saveptr; 286 token=strtok_r(cgiQueryString,"&",&saveptr); 287 while(token!=NULL){ 288 char *token1,*saveptr1; 289 char *name=NULL; 290 char *value=NULL; 291 token1=strtok_r(token,"=",&saveptr1); 292 while(token1!=NULL){ 293 if(name==NULL) 294 name=strdup(token1); 295 else 296 value=strdup(token1); 297 token1=strtok_r(NULL,"=",&saveptr1); 298 } 299 if(strcasecmp(name,"metapath")==0) 300 addToMap(tmpMap,name,value); 301 free(name); 302 free(value); 303 token=strtok_r(NULL,"&",&saveptr); 304 } 305 284 306 } 285 307
Note: See TracChangeset
for help on using the changeset viewer.