git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00e378f
)
async_sock: return -1/EPIPE if we're getting an end of file on read.
author
Stefan Metzmacher
<metze@samba.org>
Mon, 21 Sep 2009 00:36:06 +0000
(
02:36
+0200)
committer
Stefan Metzmacher
<metze@samba.org>
Mon, 21 Sep 2009 04:04:53 +0000
(06:04 +0200)
This makes the error handling in the callers easier.
metze
lib/async_req/async_sock.c
patch
|
blob
|
history
diff --git
a/lib/async_req/async_sock.c
b/lib/async_req/async_sock.c
index f5a0dfde708bd8b14065dcdbc09ad9e642a1fd3a..18adb42a0cb6aeeedbaf26429155db50ed3d1cd8 100644
(file)
--- 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;