summaryrefslogtreecommitdiff
path: root/event_iocp.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-11-01 14:20:25 -0400
committerNick Mathewson <nickm@torproject.org>2013-11-01 14:20:25 -0400
commit3b77d62829c4393bda6f9105a5d3b73b48a64b71 (patch)
treeda6ae1552c0c57b947b04e282ff2776872b5bbe8 /event_iocp.c
parente64a2b0b1129ade8af36515a1d87dbfb64256a49 (diff)
downloadlibevent-3b77d62829c4393bda6f9105a5d3b73b48a64b71.tar.gz
Avoid redundant invocations of init_extension_functions for IOCP
Diffstat (limited to 'event_iocp.c')
-rw-r--r--event_iocp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/event_iocp.c b/event_iocp.c
index 43212810..9648366d 100644
--- a/event_iocp.c
+++ b/event_iocp.c
@@ -141,6 +141,8 @@ get_extension_function(SOCKET s, const GUID *which_fn)
{0xb5367df2,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}}
#endif
+static int extension_fns_initialized = 0;
+
static void
init_extension_functions(struct win32_extension_fns *ext)
{
@@ -155,10 +157,11 @@ init_extension_functions(struct win32_extension_fns *ext)
ext->GetAcceptExSockaddrs = get_extension_function(s,
&getacceptexsockaddrs);
closesocket(s);
+
+ extension_fns_initialized = 1;
}
static struct win32_extension_fns the_extension_fns;
-static int extension_fns_initialized = 0;
const struct win32_extension_fns *
event_get_win32_extension_fns(void)