diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-04-22 21:42:39 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-04-22 21:42:39 +0000 |
commit | 8b23db4f4d3744f17feb043d95bd220a1ed5fb92 (patch) | |
tree | 259cfa9784303eea11adffb01e3b6d640c09a8ab /lib | |
parent | d77cc13374720c2809939c2eaeab126e84e73d7e (diff) |
Peter Sylvester pointed out that curl_easy_setopt() will always (wrongly)
return CURLE_OK no matter what happens.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/easy.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/easy.c b/lib/easy.c index 7c571e6ce..1b0532c0d 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -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) |