stream-ssl: Always initialize wevent member, even on non-Windows.
authorBen Pfaff <blp@nicira.com>
Thu, 5 Jun 2014 18:36:56 +0000 (11:36 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 5 Jun 2014 18:40:50 +0000 (11:40 -0700)
Otherwise the indeterminate 'wevent' could frustrate poll_fd_wait_at()'s
attempt to merge "poll_node"s for the same fd.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
lib/stream-ssl.c

index 7a0d218..826ebad 100644 (file)
@@ -293,6 +293,8 @@ new_ssl_stream(const char *name, int fd, enum session_type type,
     sslv->fd = fd;
 #ifdef _WIN32
     sslv->wevent = CreateEvent(NULL, FALSE, FALSE, NULL);
+#else
+    sslv->wevent = 0;
 #endif
     sslv->ssl = ssl;
     sslv->txbuf = NULL;
@@ -835,6 +837,8 @@ pssl_open(const char *name OVS_UNUSED, char *suffix, struct pstream **pstreamp,
     pssl->fd = fd;
 #ifdef _WIN32
     pssl->wevent = CreateEvent(NULL, FALSE, FALSE, NULL);
+#else
+    pssl->wevent = 0;
 #endif
     *pstreamp = &pssl->pstream;
     return 0;