Skip to content
Snippets Groups Projects
Commit 8b23db4f authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Peter Sylvester pointed out that curl_easy_setopt() will always (wrongly)

 return CURLE_OK no matter what happens.
parent d77cc133
No related branches found
No related tags found
No related merge requests found
......@@ -200,6 +200,7 @@ CURLcode curl_easy_setopt(CURL *curl, CURLoption tag, ...)
long param_long = 0;
void *param_obj = NULL;
struct SessionHandle *data = curl;
CURLcode ret=CURLE_FAILED_INIT;
va_start(arg, tag);
......@@ -213,20 +214,20 @@ CURLcode curl_easy_setopt(CURL *curl, CURLoption tag, ...)
if(tag < CURLOPTTYPE_OBJECTPOINT) {
/* This is a LONG type */
param_long = va_arg(arg, long);
Curl_setopt(data, tag, param_long);
ret = Curl_setopt(data, tag, param_long);
}
else if(tag < CURLOPTTYPE_FUNCTIONPOINT) {
/* This is a object pointer type */
param_obj = va_arg(arg, void *);
Curl_setopt(data, tag, param_obj);
ret = Curl_setopt(data, tag, param_obj);
}
else {
param_func = va_arg(arg, func_T );
Curl_setopt(data, tag, param_func);
ret = Curl_setopt(data, tag, param_func);
}
va_end(arg);
return CURLE_OK;
return ret;
}
CURLcode curl_easy_perform(CURL *curl)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment