Changeset 84994 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Jun 29, 2020 4:14:57 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 138889
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/generic/http-curl.cpp
r84509 r84994 524 524 if (pThis->cMaxRedirects != cMaxRedirects) 525 525 { 526 intrcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_MAXREDIRS, (long)cMaxRedirects);526 CURLcode rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_MAXREDIRS, (long)cMaxRedirects); 527 527 AssertMsgReturn(rcCurl == CURLE_OK, ("CURLOPT_MAXREDIRS=%u: %d (%#x)\n", cMaxRedirects, rcCurl, rcCurl), 528 528 VERR_HTTP_CURL_ERROR); … … 578 578 uint32_t uPort, const char *pszUsername, const char *pszPassword) 579 579 { 580 intrcCurl;580 CURLcode rcCurl; 581 581 AssertReturn(pszHost, VERR_INVALID_PARAMETER); 582 582 Log(("rtHttpUpdateProxyConfig: pThis=%p type=%d host='%s' port=%u user='%s'%s\n", … … 2078 2078 if (pThis->fHaveSetUserAgent) 2079 2079 { 2080 intrcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_USERAGENT, (char *)NULL);2080 CURLcode rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_USERAGENT, (char *)NULL); 2081 2081 Assert(CURL_SUCCESS(rcCurl)); NOREF(rcCurl); 2082 2082 pThis->fHaveSetUserAgent = false; … … 2166 2166 pThis->pHeaders = &pHdr->Core; 2167 2167 2168 intrcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_HTTPHEADER, pThis->pHeaders);2168 CURLcode rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_HTTPHEADER, pThis->pHeaders); 2169 2169 if (CURL_SUCCESS(rcCurl)) 2170 2170 return rtHttpUpdateUserAgentHeader(pThis, pHdr); … … 2245 2245 if (!pThis->pHeaders) 2246 2246 { 2247 intrcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_HTTPHEADER, pHeaders);2247 CURLcode rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_HTTPHEADER, pHeaders); 2248 2248 if (CURL_FAILURE(rcCurl)) 2249 2249 { … … 2525 2525 pThis->pHeaders = &pHdr->Core; 2526 2526 2527 intrcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_HTTPHEADER, pThis->pHeaders);2527 CURLcode rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_HTTPHEADER, pThis->pHeaders); 2528 2528 if (CURL_SUCCESS(rcCurl)) 2529 2529 return VINF_SUCCESS; … … 2715 2715 if (pThis->fVerifyPeer != fVerify) 2716 2716 { 2717 intrcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_SSL_VERIFYPEER, (long)fVerify);2717 CURLcode rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_SSL_VERIFYPEER, (long)fVerify); 2718 2718 AssertMsgReturn(rcCurl == CURLE_OK, ("CURLOPT_SSL_VERIFYPEER=%RTbool: %d (%#x)\n", fVerify, rcCurl, rcCurl), 2719 2719 VERR_HTTP_CURL_ERROR); … … 2740 2740 * the HTTP statuses are not translated to IPRT status codes. 2741 2741 */ 2742 static int rtHttpGetCalcStatus(PRTHTTPINTERNAL pThis, intrcCurl, uint32_t *puHttpStatus)2742 static int rtHttpGetCalcStatus(PRTHTTPINTERNAL pThis, CURLcode rcCurl, uint32_t *puHttpStatus) 2743 2743 { 2744 2744 int rc = VERR_HTTP_CURL_ERROR; … … 2891 2891 * The URL. 2892 2892 */ 2893 intrcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_URL, pszUrl);2893 CURLcode rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_URL, pszUrl); 2894 2894 if (CURL_FAILURE(rcCurl)) 2895 2895 return VERR_INVALID_PARAMETER; … … 3364 3364 { 3365 3365 RT_ZERO(pThis->BodyOutput.uData.Mem); 3366 intrcCurl = rtHttpSetWriteCallback(pThis, &rtHttpWriteBodyData, pThis);3366 CURLcode rcCurl = rtHttpSetWriteCallback(pThis, &rtHttpWriteBodyData, pThis); 3367 3367 if (fNoBody) 3368 3368 { … … 3505 3505 { 3506 3506 pThis->BodyOutput.uData.hFile = NIL_RTFILE; 3507 intrcCurl = rtHttpSetWriteCallback(pThis, &rtHttpWriteDataToFile, (void *)&pThis->BodyOutput);3507 CURLcode rcCurl = rtHttpSetWriteCallback(pThis, &rtHttpWriteDataToFile, (void *)&pThis->BodyOutput); 3508 3508 if (CURL_SUCCESS(rcCurl)) 3509 3509 { … … 3588 3588 { 3589 3589 /* Set the HTTP method. */ 3590 int rcCurl = 1;3590 CURLcode rcCurl = CURLE_BAD_FUNCTION_ARGUMENT; 3591 3591 switch (enmMethod) 3592 3592 { … … 3754 3754 { 3755 3755 AssertCompile(sizeof(curl_off_t) == sizeof(uint64_t)); 3756 intrcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_INFILESIZE_LARGE, cbContent);3756 CURLcode rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_INFILESIZE_LARGE, cbContent); 3757 3757 AssertMsgReturn(CURL_SUCCESS(rcCurl), ("%d (%#x)\n", rcCurl, rcCurl), VERR_HTTP_CURL_ERROR); 3758 3758 }
Note:
See TracChangeset
for help on using the changeset viewer.