Be more verbose about errors on the receive path.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2012-03-04 08:23:40 +01:00
parent 6daff667c5
commit 321330501f
1 changed files with 6 additions and 0 deletions

6
udp.c
View File

@ -275,6 +275,10 @@ static int receive(int fd, void *buf, int buflen,
} else if (errno == EAGAIN) { } else if (errno == EAGAIN) {
usleep(1); usleep(1);
} else { } else {
if (flags == MSG_ERRQUEUE)
pr_err("recvmsg tx timestamp failed: %m");
else
pr_err("recvmsg failed: %m");
break; break;
} }
} }
@ -294,6 +298,8 @@ static int receive(int fd, void *buf, int buflen,
if (!ts) { if (!ts) {
memset(&hwts->ts, 0, sizeof(hwts->ts)); memset(&hwts->ts, 0, sizeof(hwts->ts));
if (cnt > 0)
pr_err("missing SO_TIMESTAMPING message");
return cnt; return cnt;
} }