[asterisk-commits] nadi: branch group/trunk-cm-csel-hash r47967 - /team/group/trunk-cm-csel-hash...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Nov 23 08:13:04 MST 2006


Author: nadi
Date: Thu Nov 23 09:13:03 2006
New Revision: 47967

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47967
Log:
reverting run routine

Modified:
    team/group/trunk-cm-csel-hash/res/res_statemachine.c

Modified: team/group/trunk-cm-csel-hash/res/res_statemachine.c
URL: http://svn.digium.com/view/asterisk/team/group/trunk-cm-csel-hash/res/res_statemachine.c?view=diff&rev=47967&r1=47966&r2=47967
==============================================================================
--- team/group/trunk-cm-csel-hash/res/res_statemachine.c (original)
+++ team/group/trunk-cm-csel-hash/res/res_statemachine.c Thu Nov 23 09:13:03 2006
@@ -93,17 +93,20 @@
 	int i = 0,
 		event_out = EVENT_DEFAULT,
 		err,
+		state,
 		retval = -1,
 		leave = 0;
 
 	LOCK(sm);
 
+	state = sm->state;
+
 	if (sm->log_event)
-		sm->log_event(sm->p, LOG_RECEIVE, sm->state, event);
+		sm->log_event(sm->p, LOG_RECEIVE, state, event);
 
 	for (; i < sm->num_rows; ++i) {
 		t = &sm->table[i];
-		if ((t->state == sm->state || t->state == STATE_ANY) &&
+		if ((t->state == state || t->state == STATE_ANY) &&
 			(t->event == event || t->event == EVENT_ANY)) {
 			if (t->handle) {
 				handle_retval = t->handle(sm->p, sm->state, event);



More information about the asterisk-commits mailing list