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

SVN commits to the libpri project libpri-commits at lists.digium.com
Mon Dec 13 18:55:55 CST 2010


Author: rmudgett
Date: Mon Dec 13 18:55:49 2010
New Revision: 2166

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=2166
Log:
Fix bizarre logic to work as originally intended in q931_notify().

In revision 238: Don't allow notification codes outside of the Q.931 spec
for switches other than EuroISDN.

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=2166&r1=2165&r2=2166
==============================================================================
--- branches/1.4/q931.c (original)
+++ branches/1.4/q931.c Mon Dec 13 18:55:49 2010
@@ -4802,10 +4802,15 @@
 
 int q931_notify(struct pri *ctrl, q931_call *c, int channel, int info)
 {
-	if ((ctrl->switchtype == PRI_SWITCH_EUROISDN_T1) || (ctrl->switchtype != PRI_SWITCH_EUROISDN_E1)) {
+	switch (ctrl->switchtype) {
+	case PRI_SWITCH_EUROISDN_T1:
+	case PRI_SWITCH_EUROISDN_E1:
+		break;
+	default:
 		if ((info > 0x2) || (info < 0x00)) {
 			return 0;
 		}
+		break;
 	}
 
 	if (info >= 0) {




More information about the libpri-commits mailing list