Changeset 944 for trunk/zoo-project
- Timestamp:
- Jul 10, 2019, 2:38:34 PM (5 years ago)
- Location:
- trunk/zoo-project
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/HISTORY.txt
r917 r944 1 Version 1.7.0-dev 1 Version 1.8.0-dev 2 * Fix #172 3 Version 1.7.0 2 4 * Fix issue with UOM definitions in zcfg2sql 3 5 * Make callback and HPC support independent from each other -
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 } -
trunk/zoo-project/zoo-kernel/ulinet.h
r921 r944 75 75 */ 76 76 typedef struct { 77 long code; //!< the last received response code 78 int hasCacheFile; //!< 1 if we used a cache file 79 int id; //!< The position of the element in the queue 80 size_t nDataLen; //!< the length of the downloaded content 81 size_t nDataAlloc; //!< 77 82 CURL *handle; //!< the CURL handler 78 83 struct curl_slist *header; //!< the headers to send … … 84 89 char *post; //!< the potential POST XML content 85 90 char* cookie; //!< The potential Cookie returned by the server 86 int hasCacheFile; //!< 1 if we used a cache file87 int nDataLen; //!< the length of the downloaded content88 int nDataAlloc; //!<89 long code; //!< the last received response code90 int id; //!< The position of the element in the queue91 91 } _HINTERNET; 92 92 … … 95 95 */ 96 96 typedef struct { 97 int nb; //!< number of element in the queue 97 98 CURLM *handle; //!< the CURLM handler 98 99 _HINTERNET ihandle[MAX_REQ]; //!< individual handlers in the queue 99 100 char *waitingRequests[MAX_REQ]; //!< request in the queue 100 101 char *agent; //!< The User-Agent to use for HTTP request 101 int nb; //!< number of element in the queue102 102 } HINTERNET; 103 103
Note: See TracChangeset
for help on using the changeset viewer.