mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 23:24:18 +00:00
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:
1 parent
ff8f468d3e
commit
00207cede3
3 files changed
+6
-2
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user