Changeset 505 for trunk/zoo-project/zoo-kernel/service_internal_python.c
- Timestamp:
- Sep 23, 2014, 4:03:07 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_internal_python.c
r490 r505 193 193 PyObject *pName, *pModule, *pFunc; 194 194 tmp=getMap(s->content,"serviceProvider"); 195 if(tmp!=NULL) 196 pName = PyString_FromString(tmp->value); 195 map* mp=getMap(request,"metapath"); 196 if(tmp!=NULL){ 197 if(mp!=NULL && strlen(mp->value)>0){ 198 char *mps=zStrdup(mp->value); 199 int i,len=strlen(mps); 200 int j=0; 201 for(i=0;i<len;i++){ 202 if(mps[i]=='/'){ 203 mps[i]='.'; 204 } 205 } 206 char *mn=(char*)malloc((strlen(mps)+strlen(tmp->value)+2)*sizeof(char)); 207 sprintf(mn,"%s.%s",mps,tmp->value); 208 pName = PyString_FromString(mn); 209 free(mn); 210 free(mps); 211 } 212 else{ 213 pName = PyString_FromString(tmp->value); 214 fprintf(stderr,"%s %d",tmp->value,__LINE__); 215 } 216 } 197 217 else{ 198 218 map* err=createMap("text","Unable to parse serviceProvider please check your zcfg file."); … … 457 477 #endif 458 478 } 479 Py_DECREF(list); 459 480 return res; 460 481 } … … 507 528 } 508 529 } 530 Py_DECREF(list); 509 531 return res; 510 532 }
Note: See TracChangeset
for help on using the changeset viewer.