git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
05b0e5e
)
test_event_fd1 error only on read
author
Stefan Metzmacher
<metze@samba.org>
Thu, 28 Feb 2013 15:22:54 +0000
(16:22 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Tue, 4 Oct 2016 12:52:14 +0000
(14:52 +0200)
lib/tevent/testsuite.c
patch
|
blob
|
history
diff --git
a/lib/tevent/testsuite.c
b/lib/tevent/testsuite.c
index 4783ab41153687180b5683004dd10c80092c7c63..e430764c7f58f5415ca73ffa49c7bc1ce0720cce 100644
(file)
--- a/
lib/tevent/testsuite.c
+++ b/
lib/tevent/testsuite.c
@@
-276,13
+276,28
@@
static void test_event_fd1_fde_handler(struct tevent_context *ev_ctx,
ret = read(state->sock[0], &c, 1);
if (ret == 1) {
ret = read(state->sock[0], &c, 1);
if (ret == 1) {
+ if (flags != (TEVENT_FD_READ|TEVENT_FD_WRITE)) {
+ state->finished = true;
+ state->error = __location__;
+ return;
+ }
+ return;
+ }
+
+ /*
+ * EOF and errors should be just reported
+ * by TEVENT_FD_READ.
+ */
+ if (flags != TEVENT_FD_READ) {
+ state->finished = true;
+ state->error = __location__;
return;
}
/*
* end of test...
*/
return;
}
/*
* end of test...
*/
-
tevent_fd_set_flags(fde, 0
);
+
TEVENT_FD_NOT_READABLE(fde
);
state->drain_done = true;
return;
}
state->drain_done = true;
return;
}