Make sure we also revive links for PRIs, not just PTMP TE BRIs when we get a disconnect message

git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1291 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Matthew Fredrickson 2009-11-11 00:22:47 +00:00
parent 6a121d4c74
commit 80c8c46b89
2 changed files with 11 additions and 2 deletions

View File

@ -604,6 +604,15 @@ static inline int BRI_TE_PTMP(struct pri *mypri)
return pri->bri && (((pri)->localtype == PRI_CPE) && ((pri)->tei == Q921_TEI_GROUP)); return pri->bri && (((pri)->localtype == PRI_CPE) && ((pri)->tei == Q921_TEI_GROUP));
} }
static inline int PRI_PTP(struct pri *mypri)
{
struct pri *pri;
pri = PRI_MASTER(mypri);
return !pri->bri;
}
#define Q931_DUMMY_CALL_REFERENCE -1 #define Q931_DUMMY_CALL_REFERENCE -1
/*! /*!

4
q921.c
View File

@ -1220,8 +1220,8 @@ static pri_event *__q921_receive_qualified(struct pri *pri, q921_h *h, int len)
/* Acknowledge */ /* Acknowledge */
q921_send_ua(pri, h->u.p_f); q921_send_ua(pri, h->u.p_f);
ev = q921_dchannel_down(pri); ev = q921_dchannel_down(pri);
if (BRI_TE_PTMP(pri)) { if (BRI_TE_PTMP(pri) || PRI_PTP(pri)) {
q921_restart(pri, 0); q921_restart(pri, PRI_PTP(pri) ? 1 : 0);
} }
return ev; return ev;
case 3: case 3: