Changeset 84995 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Jun 29, 2020 4:19:48 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 138890
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/generic/http-curl.cpp
r84994 r84995 525 525 { 526 526 CURLcode rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_MAXREDIRS, (long)cMaxRedirects); 527 AssertMsgReturn( rcCurl == CURLE_OK, ("CURLOPT_MAXREDIRS=%u: %d (%#x)\n", cMaxRedirects, rcCurl, rcCurl),527 AssertMsgReturn(CURL_SUCCESS(rcCurl), ("CURLOPT_MAXREDIRS=%u: %d (%#x)\n", cMaxRedirects, rcCurl, rcCurl), 528 528 VERR_HTTP_CURL_ERROR); 529 529 530 530 rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_FOLLOWLOCATION, (long)(cMaxRedirects > 0)); 531 AssertMsgReturn( rcCurl == CURLE_OK, ("CURLOPT_FOLLOWLOCATION=%d: %d (%#x)\n", cMaxRedirects > 0, rcCurl, rcCurl),531 AssertMsgReturn(CURL_SUCCESS(rcCurl), ("CURLOPT_FOLLOWLOCATION=%d: %d (%#x)\n", cMaxRedirects > 0, rcCurl, rcCurl), 532 532 VERR_HTTP_CURL_ERROR); 533 533 … … 587 587 { 588 588 rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_NOPROXY, (const char *)NULL); 589 AssertMsgReturn( rcCurl == CURLE_OK, ("CURLOPT_NOPROXY=NULL: %d (%#x)\n", rcCurl, rcCurl),589 AssertMsgReturn(CURL_SUCCESS(rcCurl), ("CURLOPT_NOPROXY=NULL: %d (%#x)\n", rcCurl, rcCurl), 590 590 VERR_HTTP_CURL_PROXY_CONFIG); 591 591 pThis->fNoProxy = false; … … 597 597 { 598 598 rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_PROXYTYPE, (long)enmProxyType); 599 AssertMsgReturn( rcCurl == CURLE_OK, ("CURLOPT_PROXYTYPE=%d: %d (%#x)\n", enmProxyType, rcCurl, rcCurl),599 AssertMsgReturn(CURL_SUCCESS(rcCurl), ("CURLOPT_PROXYTYPE=%d: %d (%#x)\n", enmProxyType, rcCurl, rcCurl), 600 600 VERR_HTTP_CURL_PROXY_CONFIG); 601 601 pThis->enmProxyType = enmProxyType; … … 606 606 { 607 607 rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_PROXYPORT, (long)uPort); 608 AssertMsgReturn( rcCurl == CURLE_OK, ("CURLOPT_PROXYPORT=%d: %d (%#x)\n", uPort, rcCurl, rcCurl),608 AssertMsgReturn(CURL_SUCCESS(rcCurl), ("CURLOPT_PROXYPORT=%d: %d (%#x)\n", uPort, rcCurl, rcCurl), 609 609 VERR_HTTP_CURL_PROXY_CONFIG); 610 610 pThis->uProxyPort = uPort; … … 616 616 { 617 617 rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_PROXYUSERNAME, pszUsername); 618 AssertMsgReturn( rcCurl == CURLE_OK, ("CURLOPT_PROXYUSERNAME=%s: %d (%#x)\n", pszUsername, rcCurl, rcCurl),618 AssertMsgReturn(CURL_SUCCESS(rcCurl), ("CURLOPT_PROXYUSERNAME=%s: %d (%#x)\n", pszUsername, rcCurl, rcCurl), 619 619 VERR_HTTP_CURL_PROXY_CONFIG); 620 620 if (pThis->pszProxyUsername) … … 635 635 { 636 636 rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_PROXYPASSWORD, pszPassword); 637 AssertMsgReturn( rcCurl == CURLE_OK, ("CURLOPT_PROXYPASSWORD=%s: %d (%#x)\n", pszPassword ? "xxx" : NULL, rcCurl, rcCurl),637 AssertMsgReturn(CURL_SUCCESS(rcCurl), ("CURLOPT_PROXYPASSWORD=%s: %d (%#x)\n", pszPassword ? "xxx" : NULL, rcCurl, rcCurl), 638 638 VERR_HTTP_CURL_PROXY_CONFIG); 639 639 if (pThis->pszProxyPassword) … … 655 655 { 656 656 rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_PROXY, pszHost); 657 AssertMsgReturn( rcCurl == CURLE_OK, ("CURLOPT_PROXY=%s: %d (%#x)\n", pszHost, rcCurl, rcCurl),657 AssertMsgReturn(CURL_SUCCESS(rcCurl), ("CURLOPT_PROXY=%s: %d (%#x)\n", pszHost, rcCurl, rcCurl), 658 658 VERR_HTTP_CURL_PROXY_CONFIG); 659 659 if (pThis->pszProxyHost) … … 2716 2716 { 2717 2717 CURLcode rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_SSL_VERIFYPEER, (long)fVerify); 2718 AssertMsgReturn( rcCurl == CURLE_OK, ("CURLOPT_SSL_VERIFYPEER=%RTbool: %d (%#x)\n", fVerify, rcCurl, rcCurl),2718 AssertMsgReturn(CURL_SUCCESS(rcCurl), ("CURLOPT_SSL_VERIFYPEER=%RTbool: %d (%#x)\n", fVerify, rcCurl, rcCurl), 2719 2719 VERR_HTTP_CURL_ERROR); 2720 2720 pThis->fVerifyPeer = fVerify; … … 2749 2749 pThis->pszRedirLocation = NULL; 2750 2750 } 2751 if ( rcCurl == CURLE_OK)2751 if (CURL_SUCCESS(rcCurl)) 2752 2752 { 2753 2753 curl_easy_getinfo(pThis->pCurl, CURLINFO_RESPONSE_CODE, &pThis->lLastResp);
Note:
See TracChangeset
for help on using the changeset viewer.