diff options
author | Corey Farrell <git@cfware.com> | 2017-12-18 16:36:21 -0500 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2017-12-19 09:42:19 -0500 |
commit | b3e839debdc3d1042c736b451aa52ce5807e738c (patch) | |
tree | 6ad0ea51bae640cbdbc297eca224a5e5fd8e4e33 /channels | |
parent | 11a1e07ad291df072bccc9896f4d90efd056c1f8 (diff) |
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
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_skinny.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 6f4231acd..0093a1fcb 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -4753,15 +4753,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); @@ -4775,11 +4779,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); |