Skip to content

Commit

Permalink
Merge pull request #92 from Pan7/curl_error
Browse files Browse the repository at this point in the history
qcurl_multi_add_handle error check
  • Loading branch information
timangus committed Jul 26, 2015
2 parents c35e0fa + 50038a7 commit 0dad4ce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion code/client/cl_curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,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"
Expand Down Expand Up @@ -271,7 +273,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) {
Expand Down

0 comments on commit 0dad4ce

Please sign in to comment.