Revert "test_event_fd1 error only on read"
authorStefan Metzmacher <metze@samba.org>
Thu, 28 Feb 2013 15:23:35 +0000 (16:23 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 4 Oct 2016 12:52:15 +0000 (14:52 +0200)
This reverts commit 6b957a0aec98fa0d5bace8013567078d16f8f520.

lib/tevent/testsuite.c

index e430764c7f58f5415ca73ffa49c7bc1ce0720cce..4783ab41153687180b5683004dd10c80092c7c63 100644 (file)
@@ -276,28 +276,13 @@ static void test_event_fd1_fde_handler(struct tevent_context *ev_ctx,
 
                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...
                 */
-               TEVENT_FD_NOT_READABLE(fde);
+               tevent_fd_set_flags(fde, 0);
                state->drain_done = true;
                return;
        }