]> git.ipfire.org Git - thirdparty/lldpd.git/commit
event: replace `evutil_make_socket_nonblocking()` by an idempotent version
authorVincent Bernat <bernat@luffy.cx>
Mon, 15 Jul 2013 18:56:00 +0000 (20:56 +0200)
committerVincent Bernat <bernat@luffy.cx>
Mon, 15 Jul 2013 18:56:00 +0000 (20:56 +0200)
commitbec75f842fa401558a72d62bfbee04bc726407d6
tree6c8ec9bdacba1f8a171c91fd9233ce16f06c680c
parent1e0d651f6ec99fcc1ad946723a03d4216caa57c5
event: replace `evutil_make_socket_nonblocking()` by an idempotent version

Once a file descriptor is locked with `BIOCLOCK`, it is not possible
to make it non-blocking. Therefore, we need to make it non-blocking
before locking it. Unfortunately, `evutil_make_socket_nonblocking()`
does not check the current value of the flag to see if there is
anything to do and we get a spurious warning. Just provide our version
of this function for this purpose.
src/daemon/event.c
src/daemon/lldpd.h
src/daemon/priv-bsd.c