提交 de802f21 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-5498 fix state change

上级 42c6a66e
...@@ -4611,7 +4611,7 @@ static void fetch_device_stats(switch_device_record_t *drec) ...@@ -4611,7 +4611,7 @@ static void fetch_device_stats(switch_device_record_t *drec)
drec->stats.early++; drec->stats.early++;
} else if (np->callstate == CCS_RINGING) { } else if (np->callstate == CCS_RINGING) {
drec->stats.ringing++; drec->stats.ringing++;
} else { } else if (np->callstate != CCS_DOWN) {
drec->stats.active++; drec->stats.active++;
} }
} }
...@@ -4766,6 +4766,12 @@ static void switch_channel_check_device_state(switch_channel_t *channel, switch_ ...@@ -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) { switch(drec->state) {
case SDS_ACTIVE: case SDS_ACTIVE:
case SDS_ACTIVE_MULTI: case SDS_ACTIVE_MULTI:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论