]> git.ipfire.org Git - thirdparty/curl.git/commit
getinfo: CURLINFO_ACTIVESOCKET: fix bad socket value
authorJay Satiro <raysatiro@yahoo.com>
Fri, 6 Nov 2015 05:30:16 +0000 (00:30 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Fri, 6 Nov 2015 05:30:16 +0000 (00:30 -0500)
commitcd3aba1a5c618bb20b418ac73d3627b21fb795c8
tree56f6a817aa529eca578090dbd74becc7f20fbec0
parentf6fbbd6dc3bcc93c681b2f7a14a73fa561b00488
getinfo: CURLINFO_ACTIVESOCKET: fix bad socket value

- Set user info param to the socket returned by Curl_getconnectinfo,
regardless of if the socket is bad. Effectively this means the user info
param now will receive CURL_SOCKET_BAD instead of -1 on bad socket.

- Remove incorrect comments.

CURLINFO_ACTIVESOCKET is documented to write CURL_SOCKET_BAD to user
info param but prior to this change it wrote -1.

Bug: https://github.com/bagder/curl/pull/518
Reported-by: Marcel Raad
lib/getinfo.c