Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connect: output the same error msg on both code paths #5708

Closed
wants to merge 1 commit into from

Conversation

@mback2k
Copy link
Member

mback2k commented Jul 21, 2020

A failed verifyconnect on CURL_CSELECT_OUT printed the
error message "Connection failed", but the same failure
on CURL_CSELECT_ERR did not. This commit brings it in line.

@mback2k mback2k self-assigned this Jul 21, 2020
@mback2k mback2k requested a review from bagder Jul 22, 2020
@mback2k mback2k marked this pull request as ready for review Jul 22, 2020
@mback2k
Copy link
Member Author

mback2k commented Jul 22, 2020

I am also not sure if the two "Connection failed" infof statements are really needed, since there is this in case of an error:

curl/lib/connect.c

Lines 954 to 958 in d746ff1

Curl_printable_address(conn->tempaddr[i], ipaddress,
sizeof(ipaddress));
infof(data, "connect to %s port %ld failed: %s\n",
ipaddress, conn->port,
Curl_strerror(error, buffer, sizeof(buffer)));

@bagder
Copy link
Member

bagder commented Jul 27, 2020

I agree. Those two infof() error message should probably be removed in preference of the one with more details.

@mback2k
Copy link
Member Author

mback2k commented Jul 28, 2020

@bagder are you sure? The more detailed verbose message is hidden in case CURL_DISABLE_VERBOSE_STRINGS is defined.

Closes #5708
@mback2k mback2k force-pushed the mback2k:align-connect-errormsg branch from 62bba56 to 6af4350 Jul 28, 2020
@bagder
Copy link
Member

bagder commented Jul 28, 2020

Yes, as CURL_DISABLE_VERBOSE_STRINGS also converts infof() into a noop.

@mback2k mback2k closed this in 633c947 Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.