[asterisk-commits] file: branch 1.4 r47852 - /branches/1.4/main/rtp.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Nov 20 08:58:51 MST 2006


Author: file
Date: Mon Nov 20 09:58:50 2006
New Revision: 47852

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47852
Log:
Only remove/destroy the RTCP I/O item if it exists.

Modified:
    branches/1.4/main/rtp.c

Modified: branches/1.4/main/rtp.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/rtp.c?view=diff&rev=47852&r1=47851&r2=47852
==============================================================================
--- branches/1.4/main/rtp.c (original)
+++ branches/1.4/main/rtp.c Mon Nov 20 09:58:50 2006
@@ -2871,7 +2871,8 @@
 	ast_channel_lock(chan);
 	/* Remove the callback from the IO context */
 	ast_io_remove(rtp->io, iod[0]);
-	ast_io_remove(rtp->io, iod[1]);
+	if (iod[1])
+		ast_io_remove(rtp->io, iod[1]);
 	/* Restore file descriptors */
 	chan->fds[0] = fds[0];
 	chan->fds[1] = fds[1];
@@ -2888,7 +2889,7 @@
 	struct ast_frame *fr = NULL;
 	struct ast_channel *who = NULL, *other = NULL, *cs[3] = {NULL, };
 	int p0_fds[2] = {-1, -1}, p1_fds[2] = {-1, -1};
-	int *p0_iod[2] = {NULL, }, *p1_iod[2] = {NULL, };
+	int *p0_iod[2] = {NULL, NULL}, *p1_iod[2] = {NULL, NULL};
 	int p0_callback = 0, p1_callback = 0;
 	enum ast_bridge_result res = AST_BRIDGE_FAILED;
 



More information about the asterisk-commits mailing list