[svn-commits] rmudgett: branch 1.4 r1028 - /branches/1.4/q931.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Aug 26 10:24:38 CDT 2009


Author: rmudgett
Date: Wed Aug 26 10:24:34 2009
New Revision: 1028

URL: http://svn.asterisk.org/svn-view/libpri?view=rev&rev=1028
Log:
Fix BRI PTP broken by -r790.

Modified:
    branches/1.4/q931.c

Modified: branches/1.4/q931.c
URL: http://svn.asterisk.org/svn-view/libpri/branches/1.4/q931.c?view=diff&rev=1028&r1=1027&r2=1028
==============================================================================
--- branches/1.4/q931.c (original)
+++ branches/1.4/q931.c Wed Aug 26 10:24:34 2009
@@ -263,6 +263,9 @@
  */
 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 @@
 	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 @@
 	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




More information about the svn-commits mailing list