mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
stream-ssl: Always initialize wevent member, even on non-Windows.
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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user