aboutsummaryrefslogtreecommitdiff
path: root/src/tool_operate.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-02-22 18:14:33 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-02-22 18:14:33 +0000
commitee23d13a79b185f117580773be9c5171097f8311 (patch)
treea4363e8d25bf9a496fbf0312ee74c26b218a2ac1 /src/tool_operate.c
parentdcbae71812a5fdf4dc4335aa10ea75a2ab1b16d4 (diff)
tool: Fixed incorrect return code when setting HTTP request fails
During initialisation SetHTTPrequest() may fail and cURL would return PARAM_BAD_USE, which is equivalent to CURLE_NOT_BUILT_IN in cURL error terms. Instead, return CURLE_FAILED_INIT as we do for other functions that may fail during initialisation.
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r--src/tool_operate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 398cd812e..b77411bf1 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -314,13 +314,13 @@ static int operate_do(struct Configurable *config)
if(SetHTTPrequest(config,
(config->no_body?HTTPREQ_HEAD:HTTPREQ_GET),
&config->httpreq)) {
- res = PARAM_BAD_USE;
+ res = CURLE_FAILED_INIT;
goto quit_curl;
}
}
else {
if(SetHTTPrequest(config, HTTPREQ_SIMPLEPOST, &config->httpreq)) {
- res = PARAM_BAD_USE;
+ res = CURLE_FAILED_INIT;
goto quit_curl;
}
}