]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
missed a spot
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 24 Oct 2013 04:21:31 +0000 (23:21 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 24 Oct 2013 04:21:31 +0000 (23:21 -0500)
src/switch_channel.c

index a2c87414dd1c98ade7d2dcaa19c28e0a2c7d64cb..e96bbc78d7b045eccfb6c35080bf03776d52b6d0 100644 (file)
@@ -4904,7 +4904,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();
@@ -4914,7 +4914,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;