- Timestamp:
- Jan 6, 2011, 11:19:42 AM (14 years ago)
- Location:
- trunk/zoo-kernel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-kernel/service_conf.y
r57 r58 297 297 if(wait_defaults==true){ 298 298 defaultsc++; 299 /*freeMap(¤t_content);300 current_content=NULL;*/301 299 } 302 300 current_data=5; -
trunk/zoo-kernel/service_internal.c
r57 r58 406 406 int j; 407 407 for(j=0;j<2;j++) 408 if(str len(tmp2->name)==strlen(tmpPhone[j]) && strncasecmp(tmp2->name,tmpPhone[j],strlen(tmp2->name))==0){408 if(strcasecmp(tmp2->name,tmpPhone[j])==0){ 409 409 char *toto=NULL; 410 410 char *toto1=tmp2->name; … … 419 419 int j; 420 420 for(j=0;j<6;j++) 421 if(str len(tmp2->name)==strlen(tmpAddress[j]) && strncasecmp(tmp2->name,tmpAddress[j],strlen(tmp2->name))==0){421 if(strcasecmp(tmp2->name,tmpAddress[j])==0){ 422 422 char *toto=NULL; 423 423 char *toto1=tmp2->name; -
trunk/zoo-kernel/service_internal_python.c
r57 r58 201 201 PyObject* res=PyDict_New( ); 202 202 map* tmp=t; 203 map* size=getMap(tmp,"size"); 204 dumpMap(t); 203 205 while(tmp!=NULL){ 204 /*if(strcasecmp(tmp->name,"value")==0){205 map* ttmp=getMap(t,"size");206 if( ttmp!=NULL)207 if(PyDict_SetItem(res,PyString_FromString(tmp->name),PyString_FromStringAndSize(tmp->value,(Py_ssize_t) atoi( ttmp->value)))<0){206 fprintf(stderr,"%s => %s\n"),tmp->name,tmp->value; 207 if(strcasecmp(tmp->name,"value")==0){ 208 if(size!=NULL){ 209 if(PyDict_SetItem(res,PyString_FromString(tmp->name),PyString_FromStringAndSize(tmp->value,(Py_ssize_t) atoi(size->value)))<0){ 208 210 fprintf(stderr,"Unable to parse params..."); 209 211 exit(1); 210 212 } 213 } 211 214 else 212 215 if(PyDict_SetItem(res,PyString_FromString(tmp->name),PyString_FromString(tmp->value))<0){ … … 215 218 } 216 219 } 217 else */220 else 218 221 if(PyDict_SetItem(res,PyString_FromString(tmp->name),PyString_FromString(tmp->value))<0){ 219 222 fprintf(stderr,"Unable to parse params..."); -
trunk/zoo-kernel/zoo_service_loader.c
r57 r58 953 953 InternetReadFile(res, (LPVOID)tmpContent,res.nDataLen, &dwRead); 954 954 map* tmpMap=getMap(tmpmaps->content,"value"); 955 if(tmpMap!=NULL) 956 tmpMap->value=strdup(tmpContent); 955 if(tmpMap!=NULL){ 956 tmpMap->value=(char*)malloc((res.nDataLen+1)*sizeof(char)); 957 memmove(tmpMap->value,tmpContent,(res.nDataLen)*sizeof(char)); 958 tmpMap->value[res.nDataLen]=0; 959 fprintf(stderr,"%d = %d ?\n",res.nDataLen/sizeof(char),strlen(tmpContent)); 960 if(strlen(tmpContent)!=res.nDataLen/sizeof(char)){ 961 char tmp[256]; 962 sprintf(tmp,"%d",res.nDataLen); 963 addToMap(tmpmaps->content,"size",tmp); 964 } 965 /*FILE* fd=fopen("/tmp/test.png","w"); 966 fwrite(tmpContent,1,(res.nDataLen)*sizeof(char),fd); 967 fclose(fd); 968 dumpMap(tmpMap);*/ 969 } 957 970 free(tmpContent); 958 971 }
Note: See TracChangeset
for help on using the changeset viewer.