diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-10-19 19:51:27 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-10-22 15:41:38 +0300 |
commit | b8057a43d63e37891a4d34a8333c2b0181108b06 (patch) | |
tree | 7d0fca8078ae98db69241019156c646e43ad23c6 | |
parent | 5f33c34ae4b9310d537c98c767e1a9f883605757 (diff) | |
download | libmicrohttpd-b8057a43d63e37891a4d34a8333c2b0181108b06.tar.gz libmicrohttpd-b8057a43d63e37891a4d34a8333c2b0181108b06.zip |
test_upgrade{,-ssl}: portability, second step
-rw-r--r-- | src/microhttpd/test_upgrade_common.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/microhttpd/test_upgrade_common.c b/src/microhttpd/test_upgrade_common.c index d78a367e..68e40ad6 100644 --- a/src/microhttpd/test_upgrade_common.c +++ b/src/microhttpd/test_upgrade_common.c | |||
@@ -170,9 +170,9 @@ send_all (MHD_socket sock, | |||
170 | ret = MHD_send_ (sock, | 170 | ret = MHD_send_ (sock, |
171 | &text[off], | 171 | &text[off], |
172 | len - off); | 172 | len - off); |
173 | if (-1 == ret) | 173 | if (0 > ret) |
174 | { | 174 | { |
175 | if (EAGAIN == errno) | 175 | if (MHD_SCKT_ERR_IS_EAGAIN_ (MHD_socket_get_error_ ())) |
176 | { | 176 | { |
177 | ret = 0; | 177 | ret = 0; |
178 | continue; | 178 | continue; |
@@ -203,9 +203,9 @@ recv_hdr (MHD_socket sock) | |||
203 | ret = MHD_recv_ (sock, | 203 | ret = MHD_recv_ (sock, |
204 | &c, | 204 | &c, |
205 | 1); | 205 | 1); |
206 | if (-1 == ret) | 206 | if (0 > ret) |
207 | { | 207 | { |
208 | if (EAGAIN == errno) | 208 | if (MHD_SCKT_ERR_IS_EAGAIN_ (MHD_socket_get_error_ ())) |
209 | continue; | 209 | continue; |
210 | abort (); | 210 | abort (); |
211 | } | 211 | } |
@@ -246,9 +246,9 @@ recv_all (MHD_socket sock, | |||
246 | ret = MHD_recv_ (sock, | 246 | ret = MHD_recv_ (sock, |
247 | &buf[off], | 247 | &buf[off], |
248 | len - off); | 248 | len - off); |
249 | if (-1 == ret) | 249 | if (0 > ret) |
250 | { | 250 | { |
251 | if (EAGAIN == errno) | 251 | if (MHD_SCKT_ERR_IS_EAGAIN_ (MHD_socket_get_error_ ())) |
252 | { | 252 | { |
253 | ret = 0; | 253 | ret = 0; |
254 | continue; | 254 | continue; |