diff options
author | Pan7 <panter@gmx.net> | 2014-10-26 17:10:41 +0100 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2016-04-07 10:59:44 +0100 |
commit | 61f647351e041042a905153f3f9e8131b3193403 (patch) | |
tree | efd38c92a67acdebfcd41f48ab83a949e6dd87b5 /src | |
parent | 05d3587f154a7ef4ad9af6457ba48734f94319b8 (diff) |
qcurl_multi_add_handle error check
Diffstat (limited to 'src')
-rw-r--r-- | src/client/cl_curl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/cl_curl.c b/src/client/cl_curl.c index 8d083877..c3d0c7c8 100644 --- a/src/client/cl_curl.c +++ b/src/client/cl_curl.c @@ -212,6 +212,8 @@ static size_t CL_cURL_CallbackWrite(void *buffer, size_t size, size_t nmemb, void CL_cURL_BeginDownload( const char *localName, const char *remoteURL ) { + CURLMcode result; + clc.cURLUsed = qtrue; Com_Printf("URL: %s\n", remoteURL); Com_DPrintf("***** CL_cURL_BeginDownload *****\n" @@ -272,7 +274,11 @@ void CL_cURL_BeginDownload( const char *localName, const char *remoteURL ) "failed"); return; } - qcurl_multi_add_handle(clc.downloadCURLM, clc.downloadCURL); + result = qcurl_multi_add_handle(clc.downloadCURLM, clc.downloadCURL); + if(result != CURLM_OK) { + Com_Error(ERR_DROP,"CL_cURL_BeginDownload: qcurl_multi_add_handle() failed: %s", qcurl_multi_strerror(result)); + return; + } if(!(clc.sv_allowDownload & DLF_NO_DISCONNECT) && !clc.cURLDisconnected) { |