From 6f4ed1221323498c1461e43c9960ae1de5c883c8 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 23 Oct 2013 23:21:31 -0500 Subject: [PATCH] missed a spot --- src/switch_channel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switch_channel.c b/src/switch_channel.c index ae0634d802..5f53b22a7a 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -4854,7 +4854,7 @@ static void switch_channel_check_device_state(switch_channel_t *channel, switch_ break; case SDS_ACTIVE: case SDS_ACTIVE_MULTI: - if (drec->last_state != SDS_HELD && drec->active_start) { + if (drec->active_start && drec->last_state != SDS_HELD) { drec->active_stop = switch_micro_time_now(); } else if (!drec->active_start) { drec->active_start = switch_micro_time_now(); @@ -4864,7 +4864,7 @@ static void switch_channel_check_device_state(switch_channel_t *channel, switch_ drec->hold_start = switch_micro_time_now(); drec->hold_stop = 0; default: - if (drec->last_state != SDS_HELD) { + if (drec->active_start && drec->last_state != SDS_HELD) { drec->active_stop = switch_micro_time_now(); } break;