aboutsummaryrefslogtreecommitdiff
path: root/lib/connect.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-02-15 00:00:45 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-02-16 22:23:17 +0100
commitc188391a9fad6dcfa4b77b6180c19e0538e25caa (patch)
treec702d7e34a3ffa142c5a7520788557b7e95a7d1d /lib/connect.c
parent03564deba2039e3530bb166ddaddd0ec58ff045c (diff)
ftp: convert 'sock_accepted' to a plain boolean
This was an array indexed with sockindex but it was only ever used for the secondary socket. Closes #4929
Diffstat (limited to 'lib/connect.c')
-rw-r--r--lib/connect.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 611d6d2f0..9baadb565 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -1428,12 +1428,11 @@ int Curl_closesocket(struct connectdata *conn,
curl_socket_t sock)
{
if(conn && conn->fclosesocket) {
- if((sock == conn->sock[SECONDARYSOCKET]) &&
- conn->sock_accepted[SECONDARYSOCKET])
+ if((sock == conn->sock[SECONDARYSOCKET]) && conn->sock_accepted)
/* if this socket matches the second socket, and that was created with
accept, then we MUST NOT call the callback but clear the accepted
status */
- conn->sock_accepted[SECONDARYSOCKET] = FALSE;
+ conn->sock_accepted = FALSE;
else {
int rc;
Curl_multi_closed(conn->data, sock);