aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/test_upgrade_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/test_upgrade_common.c')
-rw-r--r--src/microhttpd/test_upgrade_common.c12
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;