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

SVN commits to the libpri project libpri-commits at lists.digium.com
Wed Oct 14 14:03:52 CDT 2009


Author: rmudgett
Date: Wed Oct 14 14:03:49 2009
New Revision: 1205

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1205
Log:
In q931_getcall(): Simplify test and add related switch types.

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=1205&r1=1204&r2=1205
==============================================================================
--- branches/1.4/q931.c (original)
+++ branches/1.4/q931.c Wed Oct 14 14:03:49 2009
@@ -3042,10 +3042,19 @@
 	prev = NULL;
 	while (cur) {
 		if (cur->cr == cr) {
-			if (!ctrl->bri && ctrl->switchtype != PRI_SWITCH_GR303_EOC_PATH
-				&& ctrl->switchtype != PRI_SWITCH_GR303_TMC_SWITCHING
-				&& cur->pri != ctrl) {
-				cur->pri = ctrl;
+			/* Found existing call. */
+			switch (ctrl->switchtype) {
+			case PRI_SWITCH_GR303_EOC:
+			case PRI_SWITCH_GR303_EOC_PATH:
+			case PRI_SWITCH_GR303_TMC:
+			case PRI_SWITCH_GR303_TMC_SWITCHING:
+				break;
+			default:
+				if (!ctrl->bri) {
+					/* PRI is set to whoever called us */
+					cur->pri = ctrl;
+				}
+				break;
 			}
 			return cur;
 		}




More information about the libpri-commits mailing list