Changeset 944 for trunk/zoo-project/zoo-kernel/ulinet.c
- Timestamp:
- Jul 10, 2019, 2:38:34 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/ulinet.c
r917 r944 82 82 { 83 83 size_t realsize = size * nmemb; 84 int writen=0;84 size_t writen=0; 85 85 _HINTERNET *psInternet; 86 86 if(buffer==NULL){ … … 306 306 */ 307 307 int AddMissingHeaderEntry(_HINTERNET* handle,const char* key,const char* value){ 308 int length=strlen(key)+strlen(value)+3;308 size_t length=strlen(key)+strlen(value)+3; 309 309 char *entry=(char*)malloc((length)*sizeof(char)); 310 310 if(entry==NULL) … … 326 326 char *token, *saveptr; 327 327 int cnt; 328 char* host;329 328 330 329 // knut: make a copy of url since strtok family modifies first argument and cannot be used on constant strings … … 374 373 token = strtok_r (tmp, ",", &saveptr); 375 374 while (token != NULL){ 376 int length=strlen(token)+6;375 size_t length=strlen(token)+6; 377 376 char* tmp1=(char*)malloc(length*sizeof(char)); 378 377 map* tmpMap; … … 414 413 if(handle.hasCacheFile>0){ 415 414 fclose(handle.file); 416 unlink(handle.filename);415 zUnlink(handle.filename); 417 416 free(handle.filename); 418 417 } … … 483 482 hInternet->ihandle[hInternet->nb].id = hInternet->nb; 484 483 hInternet->ihandle[hInternet->nb].nDataAlloc = 0; 484 hInternet->ihandle[hInternet->nb].code = -1; 485 485 hInternet->ihandle[hInternet->nb].pabyData = NULL; 486 486 hInternet->ihandle[hInternet->nb].post = NULL; 487 487 488 map* caBundle=getMapFromMaps((maps*) conf,"curl","cainfo"); 489 if(caBundle!=NULL) 490 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_CAINFO,caBundle->value); 488 491 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_COOKIEFILE, "ALL"); 489 492 #ifndef TIGER … … 626 629 if(tmp!=NULL) 627 630 hInternet->ihandle[i].mimeType=zStrdup(tmp); 628 curl_easy_getinfo(hInternet->ihandle[i].handle,CURLINFO_RESPONSE_CODE,& hInternet->ihandle[i].code);631 curl_easy_getinfo(hInternet->ihandle[i].handle,CURLINFO_RESPONSE_CODE,&(hInternet->ihandle[i].code)); 629 632 curl_multi_remove_handle(hInternet->handle, hInternet->ihandle[i].handle); 630 633 curl_easy_cleanup(hInternet->ihandle[i].handle); … … 658 661 */ 659 662 int InternetReadFile(_HINTERNET hInternet,LPVOID lpBuffer,int dwNumberOfBytesToRead, size_t *lpdwNumberOfBytesRead){ 660 int dwDataSize;663 size_t dwDataSize; 661 664 662 665 if(hInternet.hasCacheFile>0){ … … 684 687 685 688 if(hInternet.hasCacheFile>0){ 686 int freadRes = fread(lpBuffer,dwDataSize+1,1,hInternet.file);689 size_t freadRes = fread(lpBuffer,dwDataSize+1,1,hInternet.file); 687 690 *lpdwNumberOfBytesRead = hInternet.nDataLen; 688 691 }
Note: See TracChangeset
for help on using the changeset viewer.