FS-5498 fix state change

This commit is contained in:
Anthony Minessale 2013-06-11 11:23:45 -05:00
parent 42c6a66e08
commit de802f2124
1 changed files with 7 additions and 1 deletions

View File

@ -4611,7 +4611,7 @@ static void fetch_device_stats(switch_device_record_t *drec)
drec->stats.early++;
} else if (np->callstate == CCS_RINGING) {
drec->stats.ringing++;
} else {
} else if (np->callstate != CCS_DOWN) {
drec->stats.active++;
}
}
@ -4766,6 +4766,12 @@ static void switch_channel_check_device_state(switch_channel_t *channel, switch_
}
}
if (drec->state == SDS_DOWN && drec->last_state == SDS_DOWN) {
switch_mutex_unlock(drec->mutex);
switch_mutex_unlock(globals.device_mutex);
return;
}
switch(drec->state) {
case SDS_ACTIVE:
case SDS_ACTIVE_MULTI: