Improve error reporting on receive path.
In some error cases, no message is logged. Now we always complain loudly when an error occurs. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
9d4d68e667
commit
aa142c5240
7
sk.c
7
sk.c
|
@ -138,12 +138,15 @@ int sk_receive(int fd, void *buf, int buflen,
|
||||||
} else if (errno == EAGAIN) {
|
} else if (errno == EAGAIN) {
|
||||||
usleep(1);
|
usleep(1);
|
||||||
} else {
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cnt < 1) {
|
||||||
if (flags == MSG_ERRQUEUE)
|
if (flags == MSG_ERRQUEUE)
|
||||||
pr_err("recvmsg tx timestamp failed: %m");
|
pr_err("recvmsg tx timestamp failed: %m");
|
||||||
else
|
else
|
||||||
pr_err("recvmsg failed: %m");
|
pr_err("recvmsg failed: %m");
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (cm = CMSG_FIRSTHDR(&msg); cm != NULL; cm = CMSG_NXTHDR(&msg, cm)) {
|
for (cm = CMSG_FIRSTHDR(&msg); cm != NULL; cm = CMSG_NXTHDR(&msg, cm)) {
|
||||||
|
|
Loading…
Reference in New Issue