[libpri-commits] rmudgett: branch group/ccss r1432 - /team/group/ccss/pri_cc.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Tue Jan 19 20:10:04 CST 2010


Author: rmudgett
Date: Tue Jan 19 20:10:00 2010
New Revision: 1432

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1432
Log:
Add some sanit checking code.

Modified:
    team/group/ccss/pri_cc.c

Modified: team/group/ccss/pri_cc.c
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/pri_cc.c?view=diff&rev=1432&r1=1431&r2=1432
==============================================================================
--- team/group/ccss/pri_cc.c (original)
+++ team/group/ccss/pri_cc.c Tue Jan 19 20:10:00 2010
@@ -38,6 +38,10 @@
 #include "pri_facility.h"
 
 #include <stdlib.h>
+
+/* Define CC_SANITY_CHECKS to add some consistency sanity checking. */
+//#define CC_SANITY_CHECKS	1
+#define CC_SANITY_CHECKS	1// BUGBUG
 
 
 /* ------------------------------------------------------------------- */
@@ -2690,6 +2694,29 @@
 	/* Abort any pending indirect events. */
 	pri_schedule_del(ctrl, cc_record->t_indirect);
 	cc_record->t_indirect = 0;
+
+#if defined(CC_SANITY_CHECKS)
+	if (cc_record->t_retention) {
+		pri_error(ctrl, "T_RETENTION still active");
+		pri_schedule_del(ctrl, cc_record->t_retention);
+		cc_record->t_retention = 0;
+	}
+	if (cc_record->t_supervision) {
+		pri_error(ctrl, "T_SUPERVISION still active");
+		pri_schedule_del(ctrl, cc_record->t_supervision);
+		cc_record->t_supervision = 0;
+	}
+	if (cc_record->t_recall) {
+		pri_error(ctrl, "T_RECALL still active");
+		pri_schedule_del(ctrl, cc_record->t_recall);
+		cc_record->t_recall = 0;
+	}
+	if (q931_is_ptmp(ctrl) && cc_record->fsm.ptmp.extended_t_ccbs1) {
+		pri_error(ctrl, "Extended T_CCBS1 still active");
+		pri_schedule_del(ctrl, cc_record->fsm.ptmp.extended_t_ccbs1);
+		cc_record->fsm.ptmp.extended_t_ccbs1 = 0;
+	}
+#endif	/* defined(CC_SANITY_CHECKS) */
 
 	cc_record->fsm_complete = 1;
 }




More information about the libpri-commits mailing list