[libpri-commits] rmudgett: branch rmudgett/facility r1184 - /team/rmudgett/facility/q931.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Mon Oct 12 12:39:48 CDT 2009


Author: rmudgett
Date: Mon Oct 12 12:39:44 2009
New Revision: 1184

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1184
Log:
Eliminate use of a magic number.

Modified:
    team/rmudgett/facility/q931.c

Modified: team/rmudgett/facility/q931.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/facility/q931.c?view=diff&rev=1184&r1=1183&r2=1184
==============================================================================
--- team/rmudgett/facility/q931.c (original)
+++ team/rmudgett/facility/q931.c Mon Oct 12 12:39:44 2009
@@ -5174,12 +5174,12 @@
 	return 0;
 }
 
-static struct q931_call *q931_get_subcall_winner(struct q931_call *call)
-{
-	if (call->master_call->pri_winner < 0) {
+static struct q931_call *q931_get_subcall_winner(struct q931_call *master)
+{
+	if (master->pri_winner < 0) {
 		return NULL;
 	} else {
-		return call->subcalls[call->pri_winner];
+		return master->subcalls[master->pri_winner];
 	}
 }
 
@@ -5226,7 +5226,8 @@
 	/* Start tear down of calls that were not chosen */
 	for (i = 0; i < Q931_MAX_TEI; i++) {
 		if (realcall->subcalls[i] && realcall->subcalls[i] != subcall) {
-			initiate_hangup_if_needed(realcall->subcalls[i]->pri, realcall->subcalls[i], 26);
+			initiate_hangup_if_needed(realcall->subcalls[i]->pri, realcall->subcalls[i],
+				PRI_CAUSE_NONSELECTED_USER_CLEARING);
 		}
 	}
 }




More information about the libpri-commits mailing list