TODO writev_send not always TEVENT_FD_READ
authorStefan Metzmacher <metze@samba.org>
Wed, 2 Oct 2013 13:08:12 +0000 (15:08 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 12 Mar 2014 23:04:44 +0000 (00:04 +0100)
lib/async_req/async_sock.c

index 74b2cb7baa803223ff14d8c01cf54c6c481b0d03..5cd8a9183a47adbf9b355862bbb4ec366c07c375 100644 (file)
@@ -429,8 +429,11 @@ struct tevent_req *writev_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
        if (state->iov == NULL) {
                goto fail;
        }
-       state->flags = TEVENT_FD_WRITE|TEVENT_FD_READ;
+       state->flags = TEVENT_FD_WRITE;
        state->err_on_readability = err_on_readability;
+       if (state->err_on_readability) {
+               state->flags |= TEVENT_FD_READ;
+       }
 
        if (queue == NULL) {
                struct tevent_fd *fde;