]> granicus.if.org Git - libevent/commitdiff
Fix reinit of fds with EV_WRITE but not EV_READ.
authormaksqwe <maksqwe1@ukr.net>
Wed, 4 Sep 2013 11:25:11 +0000 (14:25 +0300)
committerNick Mathewson <nickm@torproject.org>
Wed, 4 Sep 2013 16:22:18 +0000 (12:22 -0400)
Bugfix on 2.1.1-alpha.

evmap.c

diff --git a/evmap.c b/evmap.c
index 1e2f8b552b1b2121b4c3a3ace4305b5815cc2423..13305feb0c85a333123dca1c0b1a37db5a2d6a42 100644 (file)
--- a/evmap.c
+++ b/evmap.c
@@ -582,7 +582,7 @@ evmap_io_reinit_iter_fn(struct event_base *base, evutil_socket_t fd,
        extra = ((char*)ctx) + sizeof(struct evmap_io);
        if (ctx->nread)
                events |= EV_READ;
-       if (ctx->nread)
+       if (ctx->nwrite)
                events |= EV_WRITE;
        if (evsel->fdinfo_len)
                memset(extra, 0, evsel->fdinfo_len);