Changeset 470
- Timestamp:
- May 2, 2014, 11:19:03 AM (11 years ago)
- Location:
- trunk/zoo-project/zoo-kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_internal.c
r469 r470 2925 2925 setMapInMaps(conf,"lenv",key,tmps2); 2926 2926 free(tmps2); 2927 free(test); 2927 2928 level++; 2928 2929 tmps1=strtok_r(NULL,".",&saveptr1); … … 2953 2954 } 2954 2955 }else{ 2955 char *tmp0 =zStrdup(tmp00->value);2956 tmp0 [strlen(tmp0)-1]=0;2957 setMapInMaps(conf,"lenv","Identifier",tmp0 );2958 free(tmp0 );2956 char *tmp01=zStrdup(tmp00->value); 2957 tmp01[strlen(tmp01)-1]=0; 2958 setMapInMaps(conf,"lenv","Identifier",tmp01); 2959 free(tmp01); 2959 2960 } 2960 2961 } -
trunk/zoo-project/zoo-kernel/ulinet.c
r446 r470 170 170 ret.mimeType = NULL; 171 171 172 ret.handle=curl_ easy_init();173 174 curl_ easy_setopt(ret.handle, CURLOPT_COOKIEFILE, "ALL");172 ret.handle=curl_share_init(); 173 174 curl_share_setopt(ret.handle, CURLOPT_COOKIEFILE, "ALL"); 175 175 #ifndef TIGER 176 curl_ easy_setopt(ret.handle, CURLOPT_COOKIELIST, "ALL");177 #endif 178 curl_ easy_setopt(ret.handle, CURLOPT_USERAGENT, lpszAgent);179 180 curl_ easy_setopt(ret.handle,CURLOPT_FOLLOWLOCATION,1);181 curl_ easy_setopt(ret.handle,CURLOPT_MAXREDIRS,3);176 curl_share_setopt(ret.handle, CURLOPT_COOKIELIST, "ALL"); 177 #endif 178 curl_share_setopt(ret.handle, CURLOPT_USERAGENT, lpszAgent); 179 180 curl_share_setopt(ret.handle,CURLOPT_FOLLOWLOCATION,1); 181 curl_share_setopt(ret.handle,CURLOPT_MAXREDIRS,3); 182 182 183 183 header.memory=NULL; 184 184 header.size = 0; 185 185 186 curl_ easy_setopt(ret.handle, CURLOPT_HEADERFUNCTION, header_write_data);187 curl_ easy_setopt(ret.handle, CURLOPT_WRITEHEADER, (void *)&header);188 189 #ifdef MSG_LAF_VERBOSE 190 curl_ easy_setopt(ret.handle, CURLOPT_VERBOSE, 1);186 curl_share_setopt(ret.handle, CURLOPT_HEADERFUNCTION, header_write_data); 187 curl_share_setopt(ret.handle, CURLOPT_WRITEHEADER, (void *)&header); 188 189 #ifdef MSG_LAF_VERBOSE 190 curl_share_setopt(ret.handle, CURLOPT_VERBOSE, 1); 191 191 #endif 192 192 … … 206 206 } 207 207 if(handle.handle) 208 curl_ easy_cleanup(handle.handle);208 curl_share_cleanup(handle.handle); 209 209 curl_global_cleanup(); 210 210 } … … 222 222 case INTERNET_FLAG_NO_CACHE_WRITE: 223 223 hInternet.hasCacheFile=-1; 224 curl_ easy_setopt(hInternet.handle, CURLOPT_WRITEFUNCTION, write_data_into);225 curl_ easy_setopt(hInternet.handle, CURLOPT_WRITEDATA, &hInternet);224 curl_share_setopt(hInternet.handle, CURLOPT_WRITEFUNCTION, write_data_into); 225 curl_share_setopt(hInternet.handle, CURLOPT_WRITEDATA, &hInternet); 226 226 break; 227 227 default: … … 236 236 237 237 hInternet.hasCacheFile=1; 238 curl_ easy_setopt(hInternet.handle, CURLOPT_WRITEFUNCTION, NULL);239 curl_ easy_setopt(hInternet.handle, CURLOPT_WRITEDATA, hInternet.file);238 curl_share_setopt(hInternet.handle, CURLOPT_WRITEFUNCTION, NULL); 239 curl_share_setopt(hInternet.handle, CURLOPT_WRITEDATA, hInternet.file); 240 240 hInternet.nDataLen=0; 241 241 break; … … 250 250 #endif 251 251 //curl_easy_setopt(hInternet.handle,CURLOPT_COOKIE,lpszHeaders); 252 curl_ easy_setopt(hInternet.handle,CURLOPT_POST,1);252 curl_share_setopt(hInternet.handle,CURLOPT_POST,1); 253 253 #ifdef ULINET_DEBUG 254 254 fprintf(stderr,"** (%s) %d **\n",lpszHeaders,dwHeadersLength); 255 curl_ easy_setopt(hInternet.handle,CURLOPT_VERBOSE,1);256 #endif 257 curl_ easy_setopt(hInternet.handle,CURLOPT_POSTFIELDS,lpszHeaders);255 curl_share_setopt(hInternet.handle,CURLOPT_VERBOSE,1); 256 #endif 257 curl_share_setopt(hInternet.handle,CURLOPT_POSTFIELDS,lpszHeaders); 258 258 //curl_easy_setopt(hInternet.handle,CURLOPT_POSTFIELDSIZE,dwHeadersLength+1); 259 259 if(hInternet.header!=NULL) 260 curl_ easy_setopt(hInternet.handle,CURLOPT_HTTPHEADER,hInternet.header);261 } 262 263 curl_ easy_setopt(hInternet.handle,CURLOPT_URL,lpszUrl);260 curl_share_setopt(hInternet.handle,CURLOPT_HTTPHEADER,hInternet.header); 261 } 262 263 curl_share_setopt(hInternet.handle,CURLOPT_URL,lpszUrl); 264 264 curl_easy_perform(hInternet.handle); 265 265 curl_easy_getinfo(hInternet.handle,CURLINFO_CONTENT_TYPE,&hInternet.mimeType); … … 273 273 memset(&CCookie[0],0,1024); 274 274 #ifndef TIGER 275 curl_ easy_setopt(hInternet.handle, CURLOPT_COOKIELIST, "ALL");275 curl_share_setopt(hInternet.handle, CURLOPT_COOKIELIST, "ALL"); 276 276 #endif 277 277 return 1; -
trunk/zoo-project/zoo-kernel/ulinet.h
r453 r470 64 64 65 65 typedef struct { 66 CURL *handle;66 CURLSH *handle; 67 67 struct curl_slist *header; 68 68 char* filename;
Note: See TracChangeset
for help on using the changeset viewer.