freetdm: Initial fix attempt for libpri. It will now load and work. More testing will be required, I got the feeling some event will clean a channel / span of it value when there is timer still active.
This commit is contained in:
parent
ff8f468d3e
commit
00207cede3
|
@ -1841,6 +1841,8 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_open(uint32_t span_id, uint32_t chan_id,
|
|||
||
|
||||
chan_is_avail(check)
|
||||
||
|
||||
(check->type == FTDM_CHAN_TYPE_DQ921 && ftdm_test_flag(check, FTDM_CHANNEL_CONFIGURED) && ftdm_test_flag(check, FTDM_CHANNEL_READY))
|
||||
||
|
||||
may_be_available) {
|
||||
if (!ftdm_test_flag(check, FTDM_CHANNEL_OPEN)) {
|
||||
status = check->fio->open(check);
|
||||
|
|
|
@ -1133,7 +1133,9 @@ static void *ftdm_libpri_run(ftdm_thread_t *me, void *obj)
|
|||
}
|
||||
|
||||
ftdm_log(FTDM_LOG_CRIT, "PRI down on span %d\n", isdn_data->spri.span->span_id);
|
||||
isdn_data->spri.dchan->state = FTDM_CHANNEL_STATE_DOWN;
|
||||
if (isdn_data->spri.dchan) {
|
||||
isdn_data->spri.dchan->state = FTDM_CHANNEL_STATE_DOWN;
|
||||
}
|
||||
|
||||
if (!down) {
|
||||
ftdm_set_state_all(span, FTDM_CHANNEL_STATE_RESTART);
|
||||
|
|
|
@ -177,7 +177,7 @@ int lpwrap_init_pri(struct lpwrap_pri *spri, ftdm_span_t *span, ftdm_channel_t *
|
|||
spri->dchan = dchan;
|
||||
spri->span = span;
|
||||
|
||||
if ((spri->pri = pri_new_cb(spri->dchan->sockfd, node, swtype, __pri_lpwrap_read, __pri_lpwrap_write, spri))){
|
||||
if (spri->dchan && (spri->pri = pri_new_cb(spri->dchan->sockfd, node, swtype, __pri_lpwrap_read, __pri_lpwrap_write, spri))){
|
||||
unsigned char buf[4] = { 0 };
|
||||
size_t buflen = sizeof(buf), len = 0;
|
||||
pri_set_debug(spri->pri, debug);
|
||||
|
|
Loading…
Reference in New Issue