aboutsummaryrefslogtreecommitdiff
path: root/lib/pingpong.c
diff options
context:
space:
mode:
authorHoward Chu <hyc@highlandsun.com>2010-05-07 15:05:34 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-05-07 15:05:34 +0200
commitd64bd82bdcb169d0647a80f00068cedd761f8163 (patch)
tree222920db94e7d4ae7df6df1f9a9afd0b78159492 /lib/pingpong.c
parentcb6647ce1cfba836203e91057752441302b9c46a (diff)
sendrecv: split the I/O handling into private handler
Howard Chu brought the bulk work of this patch that properly moves out the sending and recving of data to the parts of the code that are properly responsible for the various ways of doing so. Daniel Stenberg assisted with polishing a few bits and fixed some minor flaws in the original patch. Another upside of this patch is that we now abuse CURLcodes less with the "magic" -1 return codes and instead use CURLE_AGAIN more consistently.
Diffstat (limited to 'lib/pingpong.c')
-rw-r--r--lib/pingpong.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/pingpong.c b/lib/pingpong.c
index c6b6f2fb8..6172833f8 100644
--- a/lib/pingpong.c
+++ b/lib/pingpong.c
@@ -340,8 +340,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
conn->data_prot = prot;
#endif
- if(res < 0)
- /* EWOULDBLOCK */
+ if(res == CURLE_AGAIN)
return CURLE_OK; /* return */
#ifdef CURL_DOES_CONVERSIONS