[libss7-commits] mattf: trunk r179 - in /trunk: isup.c ss7.c

SVN commits to the libss7 project libss7-commits at lists.digium.com
Fri Jun 20 21:38:43 CDT 2008


Author: mattf
Date: Fri Jun 20 21:38:40 2008
New Revision: 179

URL: http://svn.digium.com/view/libss7?view=rev&rev=179
Log:
Try to make the isup_find_call and __isup_new_call logic in isup_receive less prone to instability caused by people making mistakes when writing code for new events and messages.  This will make the default behavior to generate a new, unlinked call for scratchpad purposes by default.  There is much less potential of free'ing an active call if we make the switch's default to do this instead of having the default finding an existing call

Modified:
    trunk/isup.c
    trunk/ss7.c

Modified: trunk/isup.c
URL: http://svn.digium.com/view/libss7/trunk/isup.c?view=diff&rev=179&r1=178&r2=179
==============================================================================
--- trunk/isup.c (original)
+++ trunk/isup.c Fri Jun 20 21:38:40 2008
@@ -172,10 +172,6 @@
 			return "CVR";
 		case ISUP_CFN:
 			return "CFN";
-		case ISUP_IDR:
-			return "IDR";
-		case ISUP_IRS:
-			return "IRS";
 		default:
 			return "Unknown";
 	}
@@ -2621,26 +2617,26 @@
 	/* Make sure we don't hijack a call associated isup_call for non call
 	 * associated messages */
 	switch (mh->type) {
-		case ISUP_BLO:
-		case ISUP_BLA:
-		case ISUP_UBL:
-		case ISUP_UBA:
-		case ISUP_CGB:
-		case ISUP_CGBA:
-		case ISUP_CGUA:
-		case ISUP_CGU:
-		case ISUP_UCIC:
-		case ISUP_LPA:
-		case ISUP_CCR:
-		case ISUP_CVT:
-		case ISUP_CVR:
-		case ISUP_CFN:
+		/* All of these messages are ones where a persistent call is associated with them and
+		should not generate a new, unlinked call, or free a call (unless explicitly done, link in RLC) */
+		case ISUP_IAM:
+		case ISUP_ANM:
+		case ISUP_ACM:
+		case ISUP_CPG:
+		case ISUP_COT:
+		case ISUP_CON:
+		case ISUP_REL:
+		case ISUP_RLC:
+		case ISUP_RSC:
+		case ISUP_FAA:
+		case ISUP_FAR:
+			c = isup_find_call(ss7, rl, cic);
+			break;
+		default:
 			c = __isup_new_call(ss7, 1);
 			c->dpc = rl->opc;
 			c->cic = cic;
 			break;
-		default:
-			c = isup_find_call(ss7, rl, cic);
 	}
 
 	if (!c) {

Modified: trunk/ss7.c
URL: http://svn.digium.com/view/libss7/trunk/ss7.c?view=diff&rev=179&r1=178&r2=179
==============================================================================
--- trunk/ss7.c (original)
+++ trunk/ss7.c Fri Jun 20 21:38:40 2008
@@ -17,7 +17,9 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <stdarg.h>
+#if 0
 #include <zaptel/zaptel.h>
+#endif
 #include <sys/ioctl.h>
 #include <sys/poll.h>
 #include "libss7.h"




More information about the libss7-commits mailing list