aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/test_shutdown_select.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2016-08-10 13:52:38 +0000
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2016-08-10 13:52:38 +0000
commite18185c55f8d1b6d6efe1b6a35b4c8c7bd48754a (patch)
treef0944fff5d0918803b202eb40da58b9b942982c3 /src/microhttpd/test_shutdown_select.c
parenteb46a43bc014b1d5e151fc53996aef14c29fec55 (diff)
downloadlibmicrohttpd-e18185c55f8d1b6d6efe1b6a35b4c8c7bd48754a.tar.gz
libmicrohttpd-e18185c55f8d1b6d6efe1b6a35b4c8c7bd48754a.zip
Moved thread abstraction to mhd_threads.h/mhd_threads.c,
minor bugs fixed.
Diffstat (limited to 'src/microhttpd/test_shutdown_select.c')
-rw-r--r--src/microhttpd/test_shutdown_select.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/microhttpd/test_shutdown_select.c b/src/microhttpd/test_shutdown_select.c
index df36b49c..e3aaa20f 100644
--- a/src/microhttpd/test_shutdown_select.c
+++ b/src/microhttpd/test_shutdown_select.c
@@ -77,6 +77,8 @@
77#include <stdbool.h> 77#include <stdbool.h>
78#endif /* HAVE_STDBOOL_H */ 78#endif /* HAVE_STDBOOL_H */
79 79
80#include "mhd_threads.h"
81
80#ifndef SOMAXCONN 82#ifndef SOMAXCONN
81#define SOMAXCONN 511 83#define SOMAXCONN 511
82#endif /* ! SOMAXCONN */ 84#endif /* ! SOMAXCONN */
@@ -346,7 +348,7 @@ main (int argc, char *const *argv)
346 shutdown (listen_socket, SHUT_RDWR); 348 shutdown (listen_socket, SHUT_RDWR);
347 349
348 /* fprintf (stdout, "Waiting for thread to finish...\n"); */ 350 /* fprintf (stdout, "Waiting for thread to finish...\n"); */
349 if (0 != MHD_join_thread_(sel_thrd)) 351 if (!MHD_join_thread_(sel_thrd))
350 { 352 {
351 MHD_socket_close_(listen_socket); 353 MHD_socket_close_(listen_socket);
352 fprintf (stderr, "Can't join select() thread\n"); 354 fprintf (stderr, "Can't join select() thread\n");