Skip to content

Commit 40c20c5

Browse files
kadlerlavv17
authored andcommitted
Ensure that PollVec enum matches poll values
IN and OUT are used by PollVec mask functions to determine which fd_sets to use in AddFD, FDReady, and FDSetNotReady, however these enums are not used outside of PollVec code and the rest of the code uses POLLIN and POLLOUT definitions instead. This works on many POSIX platforms since the enum values match the POLLIN and POLLOUT values, but not on AIX where POLLOUT is 2 instead of 4. This prevents code from determining when a file descriptor is writeable, leading to a hang when using FTPS protocol (at least). Fixes #672
1 parent b6f1aa2 commit 40c20c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PollVec.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ class PollVec
5959
void Block();
6060

6161
enum {
62-
IN=1,
63-
OUT=4,
62+
IN=POLLIN,
63+
OUT=POLLOUT,
6464
};
6565

6666
void SetTimeout(const timeval &t) { tv_timeout=t; }

0 commit comments

Comments
 (0)