[Asterisk-Dev] Re: EAGAIN rtp.c

dking at pimpsoft.com dking at pimpsoft.com
Mon Jul 12 23:25:31 MST 2004


Why not test the servers input buffer? If its null and EAGAIN is 
returned, then there is no data.

If its full or has something in it and EAGAIN was returned  then 
there was a error.

 Either way the extra conditional needed to find out whats going on 
exists right?

Perhapsn that will be the best for you as well?

On 12 Jul 2004 at 23:00, Wolfgang S. Rupprecht wrote:

> 
> cloos at jhcloos.com (James H. Cloos Jr.) writes:
> > >>>>> "Wolfgang" == Wolfgang S Rupprecht <list+asterisk-dev at lists.wsrcc.com> writes:
> > 
> > Wolfgang> Under unix and bsd EAGAIN simply means someone set the
> > Wolfgang> socket to non-blocking and proceeded to read the socket
> > Wolfgang> before any data arrived.
> > 
> > As kram told me: read the linux's udp.c.  It returns an EAGAIN when
> > there is a checksum error.
> 
> If EAGAIN means both "there is no data available" and "your data got
> mangled" how is one supposed to decide if there was an error or not?
> 
> I would think that the code would have to assume the best and not
> scroll a line of warning every time a read returned empty-handed.  As
> it is now, there are times I get hundreds of these warnings (under
> openbsd) when I make sip calls to a busy number and it rolls over to
> voicemail.
> 
> -wolfgang
> -- 
> Wolfgang S. Rupprecht                http://www.wsrcc.com/wolfgang/
> openbsd amd64 http://www.wsrcc.com/wolfgang/ftp/asterisk-openbsd35.patch
> _______________________________________________
> 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