summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-06-29 14:22:27 +0000
committerMark Spencer <markster@digium.com>2004-06-29 14:22:27 +0000
commit4d0dd2775a788ffddc77ae09456327bf432a32ab (patch)
treea2abd349a2d8d706334f0dae2aceb0acbc53be6e
parenteb6b35b75f083de3143297d95769cf4c00d87e10 (diff)
Report checksum failures as such (bug #1942)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-xchannels/chan_sip.c4
-rwxr-xr-xrtp.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 28b0ad9af..8311161ec 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -7168,7 +7168,9 @@ static int sipsock_read(int *id, int fd, short events, void *ignore)
memset(&req, 0, sizeof(req));
res = recvfrom(sipsock, req.data, sizeof(req.data) - 1, 0, (struct sockaddr *)&sin, &len);
if (res < 0) {
- if (errno != ECONNREFUSED)
+ if (errno == EAGAIN)
+ ast_log(LOG_NOTICE, "SIP: Received packet with bad UDP checksum\n");
+ else if (errno != ECONNREFUSED)
ast_log(LOG_WARNING, "Recv error: %s\n", strerror(errno));
return 1;
}
diff --git a/rtp.c b/rtp.c
index 46b653fe2..631ea1e33 100755
--- a/rtp.c
+++ b/rtp.c
@@ -346,7 +346,10 @@ struct ast_frame *ast_rtcp_read(struct ast_rtp *rtp)
0, (struct sockaddr *)&sin, &len);
if (res < 0) {
- ast_log(LOG_WARNING, "RTP Read error: %s\n", strerror(errno));
+ if (errno == EAGAIN)
+ ast_log(LOG_NOTICE, "RTP: Received packet with bad UDP checksum\n");
+ else
+ ast_log(LOG_WARNING, "RTP Read error: %s\n", strerror(errno));
if (errno == EBADF)
CRASH;
return &null_frame;