minissdpd.c: silently ignore EAGAIN, EWOULDBLOCK, EINTR of recv calls
This commit is contained in:
parent
612d0e44fb
commit
178f0b8c4d
|
@ -1,4 +1,7 @@
|
|||
$Id: Changelog.txt,v 1.32 2013/08/19 16:40:55 nanard Exp $
|
||||
$Id: Changelog.txt,v 1.33 2014/02/03 15:45:07 nanard Exp $
|
||||
|
||||
2014/02/03:
|
||||
silently ignore EAGAIN, EWOULDBLOCK, EINTR of recv calls
|
||||
|
||||
2013/08/19:
|
||||
Translate README in english
|
||||
|
|
|
@ -224,6 +224,7 @@ SendSSDPMSEARCHResponse(int s, const struct sockaddr * sockname,
|
|||
n = sendto(s, buf, l, 0,
|
||||
sockname, sockname_len );
|
||||
if(n < 0) {
|
||||
/* XXX handle EINTR, EAGAIN, EWOULDBLOCK */
|
||||
syslog(LOG_ERR, "sendto(udp): %m");
|
||||
}
|
||||
}
|
||||
|
@ -1002,7 +1003,10 @@ int main(int argc, char * * argv)
|
|||
(struct sockaddr *)&sendername6, &sendername6_len);
|
||||
if(n<0)
|
||||
{
|
||||
syslog(LOG_ERR, "recvfrom: %m");
|
||||
/* EAGAIN, EWOULDBLOCK, EINTR : silently ignore (try again next time)
|
||||
* other errors : log to LOG_ERR */
|
||||
if(errno != EAGAIN && errno != EWOULDBLOCK && errno != EINTR)
|
||||
syslog(LOG_ERR, "recvfrom: %m");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1033,7 +1037,10 @@ int main(int argc, char * * argv)
|
|||
(struct sockaddr *)&sendername, &sendername_len);
|
||||
if(n<0)
|
||||
{
|
||||
syslog(LOG_ERR, "recvfrom: %m");
|
||||
/* EAGAIN, EWOULDBLOCK, EINTR : silently ignore (try again next time)
|
||||
* other errors : log to LOG_ERR */
|
||||
if(errno != EAGAIN && errno != EWOULDBLOCK && errno != EINTR)
|
||||
syslog(LOG_ERR, "recvfrom: %m");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue