Changeset 509
- Timestamp:
- Oct 9, 2014, 7:25:52 PM (10 years ago)
- Location:
- trunk/zoo-project/zoo-kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_internal.c
r507 r509 327 327 328 328 #define MAX_RETRIES 10 329 330 #ifndef __APPLE__ 331 union semun { 332 int val; 333 struct semid_ds *buf; 334 ushort *array; 335 }; 336 #endif 329 337 330 338 int getKeyValue(maps* conf){ -
trunk/zoo-project/zoo-kernel/service_internal.h
r507 r509 61 61 #include <xlocale.h> 62 62 #endif 63 #include <dirent.h>64 63 #include "ulinet.h" 65 64 -
trunk/zoo-project/zoo-kernel/service_internal_php.c
r508 r509 25 25 #include "service_internal_php.h" 26 26 27 #include <sapi/embed/php_embed.h> 28 #include <zend_stream.h> 29 27 30 #ifdef ZTS 28 31 void ***tsrm_ls; 29 32 #endif 30 33 34 zval *php_Array_from_maps(maps* t); 35 zval* php_Array_from_map(map*); 36 maps* php_maps_from_Array(HashTable* t); 37 map* php_map_from_HasTable(HashTable* t); 38 31 39 int zoo_php_support(maps** main_conf,map* request,service* s,maps **real_inputs,maps **real_outputs){ 32 fprintf(stderr,"STARING PHP SCRIPT\n");33 40 maps* m=*main_conf; 34 41 maps* inputs=*real_inputs; … … 111 118 tres=array_init(mapArray); 112 119 while(tmp!=NULL){ 113 map* sMap=getMapArray(tmp,"size", i);120 map* sMap=getMapArray(tmp,"size",0); 114 121 if(strncmp(tmp->name,"value",5)==0 && sMap!=NULL){ 115 122 tres=add_assoc_stringl(mapArray,tmp->name,tmp->value,atoi(sMap->value),1); … … 216 223 INIT_PZVAL(&tmpcopy); 217 224 convert_to_string(&tmpcopy); 218 if(strncmp(key,"value" )==0){219 len=Z_STRLEN_P( varcopy);220 addToMapWithSize(final_res,key,Z_STRVAL_P( tmpcopy),len);225 if(strncmp(key,"value",5)==0){ 226 len=Z_STRLEN_P(&tmpcopy); 227 addToMapWithSize(final_res,key,Z_STRVAL_P(&tmpcopy),len); 221 228 } 222 229 else{ … … 231 238 fprintf(stderr,"%s => %s\n",key,Z_STRVAL(tmpcopy)); 232 239 #endif 233 addToMap( &final_res,key,Z_STRVAL(tmpcopy));240 addToMap(final_res,key,Z_STRVAL(tmpcopy)); 234 241 } 235 242 } -
trunk/zoo-project/zoo-kernel/service_internal_php.h
r348 r509 31 31 #include "service_internal.h" 32 32 #include <stdio.h> 33 #include <sapi/embed/php_embed.h>34 #include <zend_stream.h>35 33 36 34 #ifdef __cplusplus … … 38 36 #endif 39 37 40 zval *php_Array_from_maps(maps* t);41 zval* php_Array_from_map(map*);42 maps* php_maps_from_Array(HashTable* t);43 map* php_map_from_HasTable(HashTable* t);44 38 int zoo_php_support(maps**,map*,service*,maps**,maps**); 45 39 -
trunk/zoo-project/zoo-kernel/ulinet.c
r508 r509 59 59 60 60 size_t header_write_data(void *buffer, size_t size, size_t nmemb, void *data){ 61 if(strncmp("Set-Cookie: ", buffer,12)==0){61 if(strncmp("Set-Cookie: ",(char*)buffer,12)==0){ 62 62 int i; 63 63 char env[256]; … … 71 71 ; 72 72 #endif 73 sscanf( buffer,"%s; path=%s; domain=%s",env,path,domain);74 tmp=strcat(env,CCookie );73 sscanf((char*)buffer,"%s; path=%s; domain=%s",env,path,domain); 74 tmp=strcat(env,CCookie[0]); 75 75 #ifdef MSG_LAF_OUT 76 76 printf("\n**Cookie env : [%s] , path : [%s], domain : [%s]**\n",env,path,domain); 77 77 printf("buffer : %d (%s) (%s) (%s)\n",(buffer==NULL),buffer,tmp,CCookie); 78 78 #endif 79 strcpy(CCookie ,tmp);79 strcpy(CCookie[0],tmp); 80 80 } 81 81 return size * nmemb;//write_data_into(buffer,size,nmemb,data,HEADER); … … 160 160 fprintf( stderr, "setProxiesForProtocol (do nothing) ...\n" ); 161 161 #endif 162 return true; 162 163 } 163 164 #endif … … 301 302 curl_easy_cleanup(hInternet->ihandle[i].handle); 302 303 } 304 return 0; 303 305 } 304 306
Note: See TracChangeset
for help on using the changeset viewer.