mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Fix boilerplate code for re-running system calls on EINTR and EAGAIN etc.
The nasty code with static variable in retry_send() which avoids looping forever needs to be called on success of the syscall, to reset the static variable.
This commit is contained in:
@@ -443,7 +443,7 @@ void dhcp_packet(time_t now, int pxe_fd)
|
||||
setsockopt(fd, IPPROTO_IP, IP_BOUND_IF, &iface_index, sizeof(iface_index));
|
||||
#endif
|
||||
|
||||
while(sendmsg(fd, &msg, 0) == -1 && retry_send());
|
||||
while(retry_send(sendmsg(fd, &msg, 0)));
|
||||
}
|
||||
|
||||
/* check against secondary interface addresses */
|
||||
|
||||
Reference in New Issue
Block a user