Fix BRI PTP broken by -r790.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1028 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
parent
97f33e3286
commit
61f7a372d9
7
q931.c
7
q931.c
@ -263,6 +263,9 @@ struct ie {
|
||||
*/
|
||||
int q931_is_ptmp(struct pri *ctrl)
|
||||
{
|
||||
/* Check master control structure */
|
||||
for (; ctrl->master; ctrl = ctrl->master) {
|
||||
}
|
||||
return ctrl->tei == Q921_TEI_GROUP;
|
||||
}
|
||||
|
||||
@ -2997,7 +3000,7 @@ static q931_call *q931_getcall(struct pri *ctrl, int cr)
|
||||
q931_party_redirecting_init(&cur->redirecting);
|
||||
|
||||
/* PRI is set to whoever called us */
|
||||
if (ctrl->bri && (ctrl->localtype == PRI_CPE)) {
|
||||
if (q931_is_ptmp(ctrl) && (ctrl->localtype == PRI_CPE)) {
|
||||
/*
|
||||
* Point to the master to avoid stale pointer problems if
|
||||
* the TEI is removed later.
|
||||
@ -3321,7 +3324,7 @@ static int send_message(struct pri *ctrl, q931_call *call, int msgtype, int ies[
|
||||
len = sizeof(buf) - len;
|
||||
|
||||
ctrl = call->pri;
|
||||
if (ctrl->bri && (ctrl->localtype == PRI_CPE)) {
|
||||
if (q931_is_ptmp(ctrl) && (ctrl->localtype == PRI_CPE)) {
|
||||
/*
|
||||
* Must use the BRI subchannel structure to send with the correct TEI.
|
||||
* Note: If the subchannel is NULL then there is no TEI assigned and
|
||||
|
Loading…
Reference in New Issue
Block a user