diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-20 15:58:50 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-20 15:58:50 +0000 |
commit | 41832e710c2e498335e9a18b2b6d120c62ec2990 (patch) | |
tree | 0e33085cce33240663109f44c9d6e5473e3285b4 /main | |
parent | 33061c4842f1f5beaa5ef9da703db6530f44e633 (diff) |
Only remove/destroy the RTCP I/O item if it exists.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47852 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/rtp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main/rtp.c b/main/rtp.c index 5db05be95..cb73e745d 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -2871,7 +2871,8 @@ static int p2p_callback_disable(struct ast_channel *chan, struct ast_rtp *rtp, i 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 @@ static enum ast_bridge_result bridge_p2p_loop(struct ast_channel *c0, struct ast 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; |