Skip to content

Commit

Permalink
Revert "poll-loop: Fix assertion in poll_create_node()."
Browse files Browse the repository at this point in the history
This reverts commit ae09fae.
Commit ae09fae caused segfaults while running unit tests
on Windows as pollfd.fd on Windows does not take negative values.

Signed-off-by: Gurucharan Shetty <[email protected]>
  • Loading branch information
shettyg committed Sep 30, 2015
1 parent 4ed4714 commit 18167ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ Hao Zheng [email protected]
Helmut Schaa [email protected]
Huanle Han [email protected]
Ian Campbell [email protected]
Ilya Maximets [email protected]
Isaku Yamahata [email protected]
James P. [email protected]
James Page [email protected]
Expand Down Expand Up @@ -328,7 +327,6 @@ Mikael Doverhag [email protected]
Mrinmoy Das [email protected]
Nagi Reddy Jonnala [email protected]
Niels van Adrichem [email protected]
Nikita Kalyazin [email protected]
Niklas Andersson [email protected]
Pankaj Thakkar [email protected]
Pasi Kärkkäinen [email protected]
Expand Down
4 changes: 2 additions & 2 deletions lib/poll-loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 == -1 || !wevent);
ovs_assert(!fd != !wevent);

/* Check for duplicate. If found, "or" the events. */
node = find_poll_node(loop, fd, wevent);
Expand Down Expand Up @@ -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(-1, wevent, 0, where);
poll_create_node(0, wevent, 0, where);
}
#endif /* _WIN32 */

Expand Down

0 comments on commit 18167ff

Please sign in to comment.