From e6d08d92e35e176d02b6d1cc7da3696d2c12e86f Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Fri, 20 Apr 2012 16:57:09 +0000 Subject: Move debug message in ast_rtp_instance_early_bridge_make_compatible(). Move debug message in ast_rtp_instance_early_bridge_make_compatible() to be output when what it states has actually happened. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362920 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/rtp_engine.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/main/rtp_engine.c b/main/rtp_engine.c index 72f247f10..681029ffb 100644 --- a/main/rtp_engine.c +++ b/main/rtp_engine.c @@ -1449,7 +1449,6 @@ void ast_rtp_instance_early_bridge_make_compatible(struct ast_channel *c0, struc enum ast_rtp_glue_result audio_glue1_res = AST_RTP_GLUE_RESULT_FORBID, video_glue1_res = AST_RTP_GLUE_RESULT_FORBID; struct ast_format_cap *cap0 = ast_format_cap_alloc_nolock(); struct ast_format_cap *cap1 = ast_format_cap_alloc_nolock(); - int res = 0; /* Lock both channels so we can look for the glue that binds them together */ ast_channel_lock_both(c0, c1); @@ -1504,11 +1503,13 @@ void ast_rtp_instance_early_bridge_make_compatible(struct ast_channel *c0, struc } if (glue0->update_peer(c0, instance1, vinstance1, tinstance1, cap1, 0)) { - ast_log(LOG_WARNING, "Channel '%s' failed to setup early bridge to '%s'\n", ast_channel_name(c0), c1 ? ast_channel_name(c1) : ""); + ast_log(LOG_WARNING, "Channel '%s' failed to setup early bridge to '%s'\n", + ast_channel_name(c0), ast_channel_name(c1)); + } else { + ast_debug(1, "Seeded SDP of '%s' with that of '%s'\n", + ast_channel_name(c0), ast_channel_name(c1)); } - res = 0; - done: ast_channel_unlock(c0); ast_channel_unlock(c1); @@ -1522,10 +1523,6 @@ done: unref_instance_cond(&vinstance1); unref_instance_cond(&tinstance0); unref_instance_cond(&tinstance1); - - if (!res) { - ast_debug(1, "Seeded SDP of '%s' with that of '%s'\n", ast_channel_name(c0), c1 ? ast_channel_name(c1) : ""); - } } int ast_rtp_instance_early_bridge(struct ast_channel *c0, struct ast_channel *c1) -- cgit v1.2.3