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:
Marc Olivier Chouinard
2010-09-30 02:37:57 -04:00
parent ff8f468d3e
commit 00207cede3
3 changed files with 6 additions and 2 deletions

View File

@@ -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);