From d6b2f457d97abf56323414cb2faa404a978eda08 Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Mon, 18 Dec 2017 16:36:21 -0500 Subject: Remove constant conditionals (dead-code). Some variables are set and never changed, making them constant. This means that code in the 'false' block of the conditional is unreachable. In chan_skinny and res_config_ldap I used preprocessor directive `#if 0` as I'm unsure if the unreachable code could be enabled in the future. Change-Id: I62e2aac353d739fb3c983cf768933120f5fba059 --- channels/chan_skinny.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'channels') diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index ccf6a9464..97634bcbc 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -4756,15 +4756,19 @@ static void start_rtp(struct skinny_subchannel *sub) { struct skinny_line *l = sub->line; struct skinny_device *d = l->device; +#if 0 int hasvideo = 0; +#endif struct ast_sockaddr bindaddr_tmp; skinny_locksub(sub); SKINNY_DEBUG(DEBUG_AUDIO, 3, "Sub %u - Starting RTP\n", sub->callid); ast_sockaddr_from_sin(&bindaddr_tmp, &bindaddr); sub->rtp = ast_rtp_instance_new("asterisk", sched, &bindaddr_tmp, NULL); +#if 0 if (hasvideo) sub->vrtp = ast_rtp_instance_new("asterisk", sched, &bindaddr_tmp, NULL); +#endif if (sub->rtp) { ast_rtp_instance_set_prop(sub->rtp, AST_RTP_PROPERTY_RTCP, 1); @@ -4778,11 +4782,13 @@ static void start_rtp(struct skinny_subchannel *sub) ast_channel_set_fd(sub->owner, 0, ast_rtp_instance_fd(sub->rtp, 0)); ast_channel_set_fd(sub->owner, 1, ast_rtp_instance_fd(sub->rtp, 1)); } +#if 0 if (hasvideo && sub->vrtp && sub->owner) { ast_rtp_instance_set_channel_id(sub->vrtp, ast_channel_uniqueid(sub->owner)); ast_channel_set_fd(sub->owner, 2, ast_rtp_instance_fd(sub->vrtp, 0)); ast_channel_set_fd(sub->owner, 3, ast_rtp_instance_fd(sub->vrtp, 1)); } +#endif if (sub->rtp) { ast_rtp_instance_set_qos(sub->rtp, qos.tos_audio, qos.cos_audio, "Skinny RTP"); ast_rtp_instance_set_prop(sub->rtp, AST_RTP_PROPERTY_NAT, l->nat); -- cgit v1.2.3