[asterisk-commits] file: trunk r41317 - /trunk/main/rtp.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Aug 29 20:18:04 MST 2006


Author: file
Date: Tue Aug 29 22:18:04 2006
New Revision: 41317

URL: http://svn.digium.com/view/asterisk?rev=41317&view=rev
Log:
Only switch the second alert fd (which is RTCP) to callback mode if it is in use

Modified:
    trunk/main/rtp.c

Modified: trunk/main/rtp.c
URL: http://svn.digium.com/view/asterisk/trunk/main/rtp.c?rev=41317&r1=41316&r2=41317&view=diff
==============================================================================
--- trunk/main/rtp.c (original)
+++ trunk/main/rtp.c Tue Aug 29 22:18:04 2006
@@ -2807,7 +2807,8 @@
 
 	/* Now, fire up callback mode */
 	iod[0] = ast_io_add(rtp->io, fds[0], p2p_rtp_callback, AST_IO_IN, rtp);
-	iod[1] = ast_io_add(rtp->io, fds[1], p2p_rtp_callback, AST_IO_IN, rtp);
+	if (fds[1] >= 0)
+		iod[1] = ast_io_add(rtp->io, fds[1], p2p_rtp_callback, AST_IO_IN, rtp);
 
 	return 1;
 }



More information about the asterisk-commits mailing list