[Asterisk-Dev] EAGAIN rtp.c

Wolfgang S. Rupprecht list+asterisk-dev at lists.wsrcc.com
Mon Jul 12 17:39:39 MST 2004


Under unix and bsd EAGAIN simply means someone set the socket to
non-blocking and proceeded to read the socket before any data arrived.

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?

rtp.c: 

	res = recvfrom(rtp->rtcp->s, rtcpdata, sizeof(rtcpdata),
					0, (struct sockaddr *)&sin, &len);
	if (res < 0) {
		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;
	}

-wolfgang
-- 
Wolfgang S. Rupprecht                http://www.wsrcc.com/wolfgang/
openbsd amd64 http://www.wsrcc.com/wolfgang/ftp/asterisk-openbsd35.patch



More information about the asterisk-dev mailing list