aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-30 03:18:04 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-30 03:18:04 +0000
commite295dc6f8b56eae7ceff551893b44f43a88b295a (patch)
tree768fd94697652a3e88b070a04ad6ef9d53d70437 /main
parent888a9a8bb147c6805e8b00a71e179e8fefae6a76 (diff)
Only switch the second alert fd (which is RTCP) to callback mode if it is in use
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41317 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/rtp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/rtp.c b/main/rtp.c
index 2ba7ee0de..8631a4d77 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -2807,7 +2807,8 @@ static int p2p_callback_enable(struct ast_channel *chan, struct ast_rtp *rtp, in
/* 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;
}