[Asterisk-Dev] Re: EAGAIN rtp.c
dking at pimpsoft.com
dking at pimpsoft.com
Tue Jul 13 06:00:05 MST 2004
TryAgain:
ret = Syscall();
if(ret == EAGAIN) goto TryAgain;
So take out the logging line. Or make it valid only when DEBUG is
defined.
On 13 Jul 2004 at 0:40, Wolfgang S. Rupprecht wrote:
>
> dking at pimpsoft.com writes:
> > 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?
>
> I'm not sure that's right either. The errno variable isn't valid
> unless the count returned is negative (hence you can't have any
> returned data).
>
> Treating EAGAIN as an error and printing something is against the
> spirit of that return value. It is supposed to be a good return value
> that means "There is no data this time, but you are encouraged to try
> it again. There is nothing that will prevent it from working the next
> time."
>
> -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