aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_add_conn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_add_conn.c')
-rw-r--r--src/testcurl/test_add_conn.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/testcurl/test_add_conn.c b/src/testcurl/test_add_conn.c
index 1c6b3adf..9bd7964f 100644
--- a/src/testcurl/test_add_conn.c
+++ b/src/testcurl/test_add_conn.c
@@ -1053,12 +1053,11 @@ testStopRace (enum testMhdPollType pollType)
1053 MHD_socket fd2; 1053 MHD_socket fd2;
1054 struct addConnParam aParam; 1054 struct addConnParam aParam;
1055 int ret = 0; /* Return value of the test */ 1055 int ret = 0; /* Return value of the test */
1056 const int c_no_listen = no_listen; /* Local const value to mute analyzer */
1057 1056
1058 d = startTestMhdDaemon (testMhdThreadInternal, pollType, 1057 d = startTestMhdDaemon (testMhdThreadInternal, pollType,
1059 &d_port); 1058 &d_port);
1060 1059
1061 if (! c_no_listen) 1060 if (! no_listen)
1062 { 1061 {
1063 fd1 = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP); 1062 fd1 = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
1064 if (MHD_INVALID_SOCKET == fd1) 1063 if (MHD_INVALID_SOCKET == fd1)
@@ -1071,6 +1070,8 @@ testStopRace (enum testMhdPollType pollType)
1071 if (connect (fd1, (struct sockaddr *) (&sin), sizeof(sin)) < 0) 1070 if (connect (fd1, (struct sockaddr *) (&sin), sizeof(sin)) < 0)
1072 externalErrorExitDesc ("socket() failed"); 1071 externalErrorExitDesc ("socket() failed");
1073 } 1072 }
1073 else
1074 fd1 = MHD_INVALID_SOCKET;
1074 1075
1075 aParam.d = d; 1076 aParam.d = d;
1076 aParam.lstn_sk = createListeningSocket (&a_port); /* Sets a_port */ 1077 aParam.lstn_sk = createListeningSocket (&a_port); /* Sets a_port */
@@ -1092,7 +1093,7 @@ testStopRace (enum testMhdPollType pollType)
1092 1093
1093 MHD_stop_daemon (d); 1094 MHD_stop_daemon (d);
1094 1095
1095 if (! c_no_listen) 1096 if (MHD_INVALID_SOCKET != fd1)
1096 (void) MHD_socket_close_ (fd1); 1097 (void) MHD_socket_close_ (fd1);
1097 (void) MHD_socket_close_ (aParam.lstn_sk); 1098 (void) MHD_socket_close_ (aParam.lstn_sk);
1098 (void) MHD_socket_close_ (fd2); 1099 (void) MHD_socket_close_ (fd2);