[Asterisk-Dev] EAGAIN rtp.c
Dr. Rich Murphey
rich at WhiteOakLabs.com
Mon Jul 12 22:22:02 MST 2004
Here's a suggestion to help the patch cover the *BSDs.
Cheers,
Rich
--- rtp.c 22 Jun 2004 18:48:59 -0000 1.73
+++ rtp.c 13 Jul 2004 05:18:10 -0000
@@ -411,10 +411,12 @@
rtpheader = (unsigned int *)(rtp->rawdata + AST_FRIENDLY_OFFSET);
if (res < 0) {
- if (errno == EAGAIN)
- ast_log(LOG_NOTICE, "RTP: Received packet with bad
UDP checksum\n");
- else
+ if (errno != EAGAIN)
ast_log(LOG_WARNING, "RTP Read error: %s\n",
strerror(errno));
+#if ! defined(BSD)
+ else
+ ast_log(LOG_NOTICE, "RTP: Received packet with bad
UDP checksum\n");
+#endif
if (errno == EBADF)
CRASH;
return &null_frame;
> -----Original Message-----
> From: asterisk-dev-admin at lists.digium.com
> [mailto:asterisk-dev-admin at lists.digium.com] On Behalf Of
> Tilghman Lesher
> Sent: Monday, July 12, 2004 10:00 PM
> To: asterisk-dev at lists.digium.com
> Subject: Re: [Asterisk-Dev] EAGAIN rtp.c
>
> On Monday 12 July 2004 19:39, Wolfgang S. Rupprecht wrote:
> > Under unix and bsd EAGAIN simply means someone set the socket to
> > non-blocking and proceeded to read the socket before any
> data arrived.
>
> EAGAIN can also occur with an interrupted system call. On
> some systems (not Linux), system calls are not interruptible
> or are not restartable, if they are interrupted.
>
> > Here the code is treating EAGAIN as if it were some error.
> Is this a
> > linux thing that I need to note or is it a bug?
>
> Probably a bug.
>
> --
> Tilghman
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
>
>
More information about the asterisk-dev
mailing list