提交 e1a6fd27 authored 作者: Stefan Knoblich's avatar Stefan Knoblich

ftmod_libpri: Always try to close the d-channel to avoid a possible deadlock in…

ftmod_libpri: Always try to close the d-channel to avoid a possible deadlock in case something fails in the I/O module's channel open function.
Signed-off-by: 's avatarStefan Knoblich <s.knoblich@axsentis.de>
上级 41b956fd
......@@ -1938,6 +1938,14 @@ static void *ftdm_libpri_run(ftdm_thread_t *me, void *obj)
ftdm_sleep(5000);
}
out:
/* close d-channel, if set */
if (isdn_data->dchan) {
if (ftdm_channel_close(&isdn_data->dchan) != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_ERROR, "Failed to close D-Channel %d:%d\n",
ftdm_channel_get_span_id(isdn_data->dchan), ftdm_channel_get_id(isdn_data->dchan));
}
}
ftdm_log(FTDM_LOG_DEBUG, "PRI thread ended on span %d\n", ftdm_span_get_id(span));
ftdm_clear_flag(span, FTDM_SPAN_IN_THREAD);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论