[libpri-commits] rmudgett: branch 1.4 r2169 - /branches/1.4/q931.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Mon Dec 20 22:42:12 UTC 2010


Author: rmudgett
Date: Mon Dec 20 16:42:07 2010
New Revision: 2169

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=2169
Log:
Fix regression when reorganized for struct pri and struct q921_link.

Modified:
    branches/1.4/q931.c

Modified: branches/1.4/q931.c
URL: http://svnview.digium.com/svn/libpri/branches/1.4/q931.c?view=diff&rev=2169&r1=2168&r2=2169
==============================================================================
--- branches/1.4/q931.c (original)
+++ branches/1.4/q931.c Mon Dec 20 16:42:07 2010
@@ -7426,12 +7426,16 @@
 	struct q931_call *winner;
 	struct q931_call *match;
 
+	if (!held_call->link) {
+		/* Held call does not have an active link. */
+		return NULL;
+	}
 	match = NULL;
 	for (cur = *ctrl->callpool; cur; cur = cur->next) {
 		if (cur->hold_state == Q931_HOLD_STATE_IDLE) {
 			/* Found an active call. */
 			winner = q931_find_winning_call(cur);
-			if (!winner || (BRI_NT_PTMP(ctrl) && winner->pri != held_call->pri)) {
+			if (!winner || (BRI_NT_PTMP(ctrl) && winner->link != held_call->link)) {
 				/* There is no winner or the active call does not go to the same TEI. */
 				continue;
 			}
@@ -7478,12 +7482,16 @@
 	struct q931_call *winner;
 	struct q931_call *match;
 
+	if (!active_call->link) {
+		/* Active call does not have an active link. */
+		return NULL;
+	}
 	match = NULL;
 	for (cur = *ctrl->callpool; cur; cur = cur->next) {
 		if (cur->hold_state == Q931_HOLD_STATE_CALL_HELD) {
 			/* Found a held call. */
 			winner = q931_find_winning_call(cur);
-			if (!winner || (BRI_NT_PTMP(ctrl) && winner->pri != active_call->pri)) {
+			if (!winner || (BRI_NT_PTMP(ctrl) && winner->link != active_call->link)) {
 				/* There is no winner or the held call does not go to the same TEI. */
 				continue;
 			}




More information about the libpri-commits mailing list