diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-10-11 15:20:40 +0000 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-10-11 15:20:40 +0000 |
commit | a8948d201be986112a2a616b2ff30e58e8a8f08f (patch) | |
tree | cf8211f0691aa1a1f6f40b6e051b5be6ddd9dfae /src/testcurl/https/test_https_time_out.c | |
parent | 3675d8e5a77e91147a14da7bdbbdcc9fe6a3b5d6 (diff) | |
download | libmicrohttpd-a8948d201be986112a2a616b2ff30e58e8a8f08f.tar.gz libmicrohttpd-a8948d201be986112a2a616b2ff30e58e8a8f08f.zip |
Refactored mhd_locks.h and mhd_sockets.h: allow usage of macros without
aborting of execution.
Diffstat (limited to 'src/testcurl/https/test_https_time_out.c')
-rw-r--r-- | src/testcurl/https/test_https_time_out.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/testcurl/https/test_https_time_out.c b/src/testcurl/https/test_https_time_out.c index b1725256..bd14b8a2 100644 --- a/src/testcurl/https/test_https_time_out.c +++ b/src/testcurl/https/test_https_time_out.c | |||
@@ -27,20 +27,10 @@ | |||
27 | 27 | ||
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "microhttpd.h" | 29 | #include "microhttpd.h" |
30 | #include "internal.h" | ||
31 | #include "tls_test_common.h" | 30 | #include "tls_test_common.h" |
32 | #include <gcrypt.h> | 31 | #include <gcrypt.h> |
33 | #include "mhd_sockets.h" /* only macros used */ | 32 | #include "mhd_sockets.h" /* only macros used */ |
34 | 33 | ||
35 | #undef MHD_PANIC | ||
36 | |||
37 | |||
38 | void | ||
39 | MHD_PANIC (char *msg) | ||
40 | { | ||
41 | fprintf (stderr, "%s", msg); | ||
42 | abort (); | ||
43 | } | ||
44 | 34 | ||
45 | #ifdef _WIN32 | 35 | #ifdef _WIN32 |
46 | #ifndef WIN32_LEAN_AND_MEAN | 36 | #ifndef WIN32_LEAN_AND_MEAN |
@@ -80,7 +70,7 @@ test_tls_session_time_out (gnutls_session_t session) | |||
80 | if (ret < 0) | 70 | if (ret < 0) |
81 | { | 71 | { |
82 | fprintf (stderr, "Error: %s\n", MHD_E_FAILED_TO_CONNECT); | 72 | fprintf (stderr, "Error: %s\n", MHD_E_FAILED_TO_CONNECT); |
83 | MHD_socket_close_ (sd); | 73 | MHD_socket_close_chk_ (sd); |
84 | return -1; | 74 | return -1; |
85 | } | 75 | } |
86 | 76 | ||
@@ -88,7 +78,7 @@ test_tls_session_time_out (gnutls_session_t session) | |||
88 | if (ret < 0) | 78 | if (ret < 0) |
89 | { | 79 | { |
90 | fprintf (stderr, "Handshake failed\n"); | 80 | fprintf (stderr, "Handshake failed\n"); |
91 | MHD_socket_close_ (sd); | 81 | MHD_socket_close_chk_ (sd); |
92 | return -1; | 82 | return -1; |
93 | } | 83 | } |
94 | 84 | ||
@@ -99,11 +89,11 @@ test_tls_session_time_out (gnutls_session_t session) | |||
99 | if (send (sd, "", 1, 0) == 0) | 89 | if (send (sd, "", 1, 0) == 0) |
100 | { | 90 | { |
101 | fprintf (stderr, "Connection failed to time-out\n"); | 91 | fprintf (stderr, "Connection failed to time-out\n"); |
102 | MHD_socket_close_ (sd); | 92 | MHD_socket_close_chk_ (sd); |
103 | return -1; | 93 | return -1; |
104 | } | 94 | } |
105 | 95 | ||
106 | MHD_socket_close_ (sd); | 96 | MHD_socket_close_chk_ (sd); |
107 | return 0; | 97 | return 0; |
108 | } | 98 | } |
109 | 99 | ||