[svn-commits] rmudgett: branch group/ccss r1395 - /team/group/ccss/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Dec 19 04:18:27 CST 2009


Author: rmudgett
Date: Sat Dec 19 04:18:26 2009
New Revision: 1395

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1395
Log:
*  Forgot to initialize cc_record->fsm.ptmp.t_ccbs1_invoke_id.
*  Added APDU_INVALID_INVOKE_ID so calls to pri_call_apdu_find() will not
find an event when the event is definitely not active.

Modified:
    team/group/ccss/pri_cc.c
    team/group/ccss/pri_facility.c
    team/group/ccss/pri_facility.h

Modified: team/group/ccss/pri_cc.c
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/pri_cc.c?view=diff&rev=1395&r1=1394&r2=1395
==============================================================================
--- team/group/ccss/pri_cc.c (original)
+++ team/group/ccss/pri_cc.c Sat Dec 19 04:18:26 2009
@@ -2374,8 +2374,9 @@
 
 	PRI_CC_ACT_DEBUG_OUTPUT(ctrl);
 
-	msg = pri_cc_get_t_ccbs1_status(cc_record);
+	msg = pri_call_apdu_find(cc_record->signaling, cc_record->fsm.ptmp.t_ccbs1_invoke_id);
 	if (msg) {
+		cc_record->fsm.ptmp.t_ccbs1_invoke_id = APDU_INVALID_INVOKE_ID;
 		pri_call_apdu_delete(cc_record->signaling, msg);
 	}
 }
@@ -2437,6 +2438,7 @@
 	}
 
 	memset(&response, 0, sizeof(response));
+	cc_record->fsm.ptmp.t_ccbs1_invoke_id = ctrl->last_invoke;
 	response.invoke_id = ctrl->last_invoke;
 	response.timeout_time = ctrl->timers[PRI_TIMER_T_CCBS1];
 	response.callback = pri_cc_ccbs_status_response;
@@ -2506,6 +2508,7 @@
 	}
 	msg = pri_call_apdu_find(cc_record->signaling, cc_record->t_activate_invoke_id);
 	if (msg) {
+		cc_record->t_activate_invoke_id = APDU_INVALID_INVOKE_ID;
 		pri_call_apdu_delete(cc_record->signaling, msg);
 	}
 }

Modified: team/group/ccss/pri_facility.c
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/pri_facility.c?view=diff&rev=1395&r1=1394&r2=1395
==============================================================================
--- team/group/ccss/pri_facility.c (original)
+++ team/group/ccss/pri_facility.c Sat Dec 19 04:18:26 2009
@@ -2817,6 +2817,10 @@
 {
 	struct apdu_event *apdu;
 
+	if (invoke_id == APDU_INVALID_INVOKE_ID) {
+		/* No need to search the list since it cannot be in there. */
+		return NULL;
+	}
 	for (apdu = call->apdus; apdu; apdu = apdu->next) {
 		/*
 		 * Note: The APDU cannot be sent and still in the queue without a

Modified: team/group/ccss/pri_facility.h
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/pri_facility.h?view=diff&rev=1395&r1=1394&r2=1395
==============================================================================
--- team/group/ccss/pri_facility.h (original)
+++ team/group/ccss/pri_facility.h Sat Dec 19 04:18:26 2009
@@ -125,6 +125,9 @@
 	char pad[8];
 };
 
+/* So calls to pri_call_apdu_find() will not find an aliased event. */
+#define APDU_INVALID_INVOKE_ID  0x10000
+
 struct apdu_callback_data {
 	/*! APDU invoke id to match with any response messages. (Result/Error/Reject) */
 	int invoke_id;




More information about the svn-commits mailing list