Skip to content
Snippets Groups Projects
Commit ee23d13a authored by Steve Holme's avatar Steve Holme
Browse files

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.
parent dcbae718
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
......
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