]> granicus.if.org Git - libevent/commitdiff
Tweaks to IOCP interface.
authorNick Mathewson <nickm@torproject.org>
Fri, 23 Oct 2009 22:38:35 +0000 (22:38 +0000)
committerNick Mathewson <nickm@torproject.org>
Fri, 23 Oct 2009 22:38:35 +0000 (22:38 +0000)
svn:r1461

bufferevent_sock.c
event.c
test/regress_iocp.c

index 5dec03f899e0847015683e30fbbfc14c840c622d..1591765f0f63e0a2a789b453464b895e5c53e170 100644 (file)
@@ -270,7 +270,7 @@ bufferevent_socket_new(struct event_base *base, evutil_socket_t fd,
        struct bufferevent *bufev;
 
 #ifdef WIN32
-       if (base && base->iocp)
+       if (base && event_base_get_iocp(base))
                return bufferevent_async_new(base, fd, options);
 #endif
 
diff --git a/event.c b/event.c
index 7078a0a5835132aecd47c13d8a8c365044b6f602..33a50d7b7de901097a7efc0109de89792653f1b3 100644 (file)
--- a/event.c
+++ b/event.c
@@ -342,7 +342,7 @@ event_base_new_with_config(struct event_config *cfg)
        }
 
 #ifdef WIN32
-       if ((cfg->flags & EVENT_BASE_FLAG_STARTUP_IOCP) != 0)
+       if (cfg && (cfg->flags & EVENT_BASE_FLAG_STARTUP_IOCP))
                event_base_start_iocp(base);
 #endif
 
index 51953cbe468b62621924901c70e098eaed066136..cd28fb7b7419246ab7f8103e8509bc7025eeb67b 100644 (file)
@@ -195,11 +195,6 @@ end:
        evbuffer_free(wbuf);
 }
 
-/*FIXME get this from a header once it's in one. */
-struct bufferevent *
-bufferevent_async_new(struct event_base *base,
-    evutil_socket_t fd, enum bufferevent_options options);
-
 static void
 test_iocp_bufferevent_async(void *ptr)
 {