summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-09-21 02:36:06 +0200
committerStefan Metzmacher <metze@samba.org>2009-09-21 06:04:53 +0200
commitf0d6e61977b68da48524e861646e2ad4bb91a214 (patch)
tree9e82a6adf4195a58f277b130baea6b3cd7934467
parent00e378f17c39c52689601bc622b9cd78a0cdce12 (diff)
downloadsamba-f0d6e61977b68da48524e861646e2ad4bb91a214.tar.gz
samba-f0d6e61977b68da48524e861646e2ad4bb91a214.tar.bz2
samba-f0d6e61977b68da48524e861646e2ad4bb91a214.zip
async_sock: return -1/EPIPE if we're getting an end of file on read.
This makes the error handling in the callers easier. metze
-rw-r--r--lib/async_req/async_sock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c
index f5a0dfde70..18adb42a0c 100644
--- a/lib/async_req/async_sock.c
+++ b/lib/async_req/async_sock.c
@@ -160,6 +160,10 @@ static void async_recv_handler(struct tevent_context *ev,
/* retry */
return;
}
+ if (state->received == 0) {
+ tevent_req_error(req, EPIPE);
+ return;
+ }
if (state->received == -1) {
tevent_req_error(req, errno);
return;