Refactored some errno handling.

This commit is contained in:
Rolf Ahrenberg 2015-01-24 16:20:13 +02:00
parent ab2a47e3e7
commit 26be862d89
4 changed files with 1 additions and 8 deletions

View File

@ -94,8 +94,6 @@ void cSatipMsearch::Process(void)
r = strtok_r(NULL, "\r\n", &s);
}
}
if (errno != EAGAIN && errno != EWOULDBLOCK)
error("Error %d reading in %s", errno, *ToString());
}
}

2
rtcp.c
View File

@ -89,8 +89,6 @@ void cSatipRtcp::Process(void)
if (offset >= 0)
tunerM.ProcessApplicationData(bufferM + offset, length);
}
if (errno != EAGAIN && errno != EWOULDBLOCK)
error("Error %d reading in %s", errno, *ToString());
}
}

3
rtp.c
View File

@ -136,9 +136,6 @@ void cSatipRtp::Process(void)
}
} while (count >= eRtpPacketReadCount);
if (errno != EAGAIN && errno != EWOULDBLOCK)
error("Error %d reading in %s [device %d]", errno, *ToString(), tunerM.GetId());
elapsed = processing.Elapsed();
if (elapsed > 1)
debug6("%s %d read(s) took %" PRIu64 " ms [device %d]", __PRETTY_FUNCTION__, count, elapsed, tunerM.GetId());

View File

@ -129,7 +129,7 @@ int cSatipSocket::Read(unsigned char *bufferAddrP, unsigned int bufferLenP)
if (len > 0)
return len;
} while (len > 0);
ERROR_IF_RET(len < 0 && errno != EAGAIN, "recvmsg()", return -1);
ERROR_IF_RET(len < 0 && errno != EAGAIN && errno != EWOULDBLOCK, "recvmsg()", return -1);
return 0;
}