[asterisk-commits] mmichelson: branch group/CCSS r217893 - /team/group/CCSS/main/ccss.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 10 17:23:05 CDT 2009


Author: mmichelson
Date: Thu Sep 10 17:23:01 2009
New Revision: 217893

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=217893
Log:
Fill in state machine logic for suspension and unsuspension.

This is going to sound crazy, but test attempt number 1 worked!


Modified:
    team/group/CCSS/main/ccss.c

Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=217893&r1=217892&r2=217893
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Thu Sep 10 17:23:01 2009
@@ -1160,7 +1160,9 @@
 			core_instance->current_state = args->state;
 			core_instance->agent->callbacks->ack(core_instance->agent);
 		} else if (core_instance->current_state == CC_CALLER_BUSY) {
-			/* Do 2 */
+			core_instance->current_state = args->state;
+			core_instance->agent->callbacks->stop_monitoring(core_instance->agent);
+			core_instance->monitor->callbacks->unsuspend(core_instance->monitor, core_instance->core_id);
 		} else {
 			ast_log(LOG_NOTICE, "Invalid state change request. Cannot go from %d to %d\n", core_instance->current_state, args->state);
 		}
@@ -1188,6 +1190,9 @@
 		if (core_instance->current_state != CC_CALLEE_READY) {
 			ast_log(LOG_NOTICE, "Invalid state change request. Cannot go from %d to %d\n", core_instance->current_state, args->state);
 		}
+		core_instance->current_state = args->state;
+		core_instance->monitor->callbacks->suspend(core_instance->monitor, core_instance->core_id);
+		core_instance->agent->callbacks->start_monitoring(core_instance->agent);
 		break;
 	case CC_RECALLING:
 		/* Both caller and callee are available, call agent's recall callback




More information about the asterisk-commits mailing list