]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: fd: Properly init the fd state in fd_insert()
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 19 Jul 2022 10:04:18 +0000 (12:04 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 19 Jul 2022 10:11:04 +0000 (12:11 +0200)
commit7e94b40a22fab080b072c4757d487a40d2c6f828
tree7ebfa9a51e867594e725fcf6e8580c3d47b8edf9
parentf7ebe584d790872f029566be588fee17f5a2168e
BUG/MINOR: fd: Properly init the fd state in fd_insert()

When a new fd is inserted in the fdtab array, its state is initialized. The
"newstate" variable is used to compute the right state (0 by default, but
FD_ET_POSSIBLE flag is set if edge-triggered is supported for the fd).
However, this variable is never used and the fd state is always set to 0.

Now, the fd state is initialized with "newstate" variable.

This bug was introduced by commit ddedc1662 ("MEDIUM: fd: make
fd_insert/fd_delete atomically update fd.tgid"). No backport needed.
include/haproxy/fd.h