2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

poll-loop: Fix assertion in poll_create_node().

Zero is a valid value for a file descriptor.

Reported-by: Nikita Kalyazin <n.kalyazin@samsung.com>
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ilya Maximets
2015-09-22 12:27:15 +03:00
committed by Ben Pfaff
parent 46dae39f93
commit ae09fae8a6
2 changed files with 4 additions and 2 deletions

View File

@@ -80,6 +80,7 @@ Hao Zheng hzheng@nicira.com
Helmut Schaa helmut.schaa@googlemail.com
Huanle Han hanxueluo@gmail.com
Ian Campbell Ian.Campbell@citrix.com
Ilya Maximets i.maximets@samsung.com
Isaku Yamahata yamahata@valinux.co.jp
James P. roampune@gmail.com
James Page james.page@ubuntu.com
@@ -326,6 +327,7 @@ Mikael Doverhag mdoverhag@nicira.com
Mrinmoy Das mrdas@ixiacom.com
Nagi Reddy Jonnala njonnala@Brocade.com
Niels van Adrichem N.L.M.vanAdrichem@tudelft.nl
Nikita Kalyazin n.kalyazin@samsung.com
Niklas Andersson nandersson@nicira.com
Pankaj Thakkar thakkar@nicira.com
Pasi Kärkkäinen pasik@iki.fi

View File

@@ -104,7 +104,7 @@ poll_create_node(int fd, HANDLE wevent, short int events, const char *where)
COVERAGE_INC(poll_create_node);
/* Both 'fd' and 'wevent' cannot be set. */
ovs_assert(!fd != !wevent);
ovs_assert(fd == -1 || !wevent);
/* Check for duplicate. If found, "or" the events. */
node = find_poll_node(loop, fd, wevent);
@@ -159,7 +159,7 @@ poll_fd_wait_at(int fd, short int events, const char *where)
void
poll_wevent_wait_at(HANDLE wevent, const char *where)
{
poll_create_node(0, wevent, 0, where);
poll_create_node(-1, wevent, 0, where);
}
#endif /* _WIN32 */