Archived
14
0
Fork 0

Report checksum failures as such (bug #1942)

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3350 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
markster 2004-06-29 14:22:27 +00:00
parent a809376df8
commit db03d7ba42
2 changed files with 7 additions and 2 deletions

View file

@ -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;
}

5
rtp.c
View file

@ -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;