From: Florian Forster Date: Fri, 5 May 2017 08:42:35 +0000 (+0200) Subject: src/liboping.c: Refactor ping_send() further. X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=1eb6f8f2eff9d3f9024a6c9e70007a5684eaa462;hp=1eb6f8f2eff9d3f9024a6c9e70007a5684eaa462;p=liboping.git src/liboping.c: Refactor ping_send() further. * Give more meaningful names to the central "ptr" and "pings" variables (now "host_to_ping" and "pings_in_flight"). * Remove special case for (errno == EINTR); effectively we only printed a different debugging message in that case. * Remove err_fds. We were not checking it at all. * Simplify the logic so only one receive or send operation happens per loop iteration. Previously, one IPv4 and one IPv6 operation might happen in the same loop iteration. The new logic always receives all replies before starting to send out more requests. * Assign the write file descriptor to its own variable to make clear that only file descriptor is set in the write_fds bitmask. ---