[asterisk-commits] mmichelson: branch group/CCSS r216641 - in /team/group/CCSS: channels/ includ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 4 17:32:02 CDT 2009


Author: mmichelson
Date: Fri Sep  4 17:31:59 2009
New Revision: 216641

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=216641
Log:
More bug fixes


Modified:
    team/group/CCSS/channels/chan_sip.c
    team/group/CCSS/include/asterisk/ccss.h
    team/group/CCSS/main/ccss.c
    team/group/CCSS/main/channel.c

Modified: team/group/CCSS/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/channels/chan_sip.c?view=diff&rev=216641&r1=216640&r2=216641
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Fri Sep  4 17:31:59 2009
@@ -18966,6 +18966,7 @@
 					if (p->owner) {
 						/* XXX TEMPORARY! FOR TESTING ONLY */
 						if (ast_get_cc_monitor_policy(p->cc_params) == AST_CC_MONITOR_GENERIC) {
+							ast_log(LOG_NOTICE, "Um, that constant is %s\n", AST_CC_GENERIC_MONITOR_TYPE);
 							ast_queue_cc_frame(p->owner, AST_CC_GENERIC_MONITOR_TYPE, AST_CC_CCBS);
 						}
 						ast_queue_control(p->owner, AST_CONTROL_BUSY);

Modified: team/group/CCSS/include/asterisk/ccss.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/include/asterisk/ccss.h?view=diff&rev=216641&r1=216640&r2=216641
==============================================================================
--- team/group/CCSS/include/asterisk/ccss.h (original)
+++ team/group/CCSS/include/asterisk/ccss.h Fri Sep  4 17:31:59 2009
@@ -457,7 +457,7 @@
  * to use that, this string is made globally available
  * for all to use
  */
-const char *AST_CC_GENERIC_MONITOR_TYPE;
+#define AST_CC_GENERIC_MONITOR_TYPE "generic"
 
 /*!
  * \brief a link that connects two monitors in the weighted graph of 

Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=216641&r1=216640&r2=216641
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Fri Sep  4 17:31:59 2009
@@ -1203,7 +1203,9 @@
 	case CC_FAILED:
 		/* Something along the way failed, call agent and monitor destructor functions
 		 */
-		prune_links(core_instance->monitor, core_instance->core_id, NULL);
+		if (core_instance->monitor) {
+			prune_links(core_instance->monitor, core_instance->core_id, NULL);
+		}
 		break;
 	default:
 		ast_log(LOG_WARNING, "Asked to change to non-existent state %d. Ignoring\n", args->state);
@@ -1241,6 +1243,7 @@
 	struct cc_core_instance *core_instance;
 	struct cc_core_instance finder;
 	char interface[AST_CHANNEL_NAME];
+	struct cc_generic_agent_pvt *generic_pvt;
 	char *dash;
 
 	ast_copy_string(interface, chan->name, sizeof(interface));
@@ -1265,6 +1268,9 @@
 		return -1;
 	}
 
+	generic_pvt = core_instance->agent->private_data;
+
+	ast_sched_thread_del(cc_sched_thread, generic_pvt->offer_timer_id);
 	return ast_cc_request_state_change(CC_CALLER_REQUESTED, core_instance->core_id, "CallCompletionRequest called");
 }
 
@@ -1555,7 +1561,7 @@
 	res = ast_register_application2(ccreq_app, ccreq_exec, NULL, NULL, NULL);
 	res |= ast_register_application2(cccancel_app, cccancel_exec, NULL, NULL, NULL);
 	res |= ast_cc_monitor_register(&extension_monitor_cbs);
-	AST_CC_GENERIC_MONITOR_TYPE = generic_monitor_cbs.type;
+	res |= ast_cc_monitor_register(&generic_monitor_cbs);
 	/* Root monitor doesn't care about the core id. The root monitor uses
 	 * extension monitor callbacks since the gist of those will be to traverse
 	 * their child links and call each of their children's callbacks

Modified: team/group/CCSS/main/channel.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/channel.c?view=diff&rev=216641&r1=216640&r2=216641
==============================================================================
--- team/group/CCSS/main/channel.c (original)
+++ team/group/CCSS/main/channel.c Fri Sep  4 17:31:59 2009
@@ -7156,7 +7156,9 @@
 
 	payload->monitor_type = monitor_type;
 	payload->service = service;
+	ast_log(LOG_NOTICE, "Going to queue a frame with payload %s, %d\n", payload->monitor_type, payload->service);
 	frame.mallocd = AST_MALLOCD_DATA;
+	frame.data.ptr = payload;
 	return ast_queue_frame(chan, &frame);
 }
 /* DO NOT PUT ADDITIONAL FUNCTIONS BELOW THIS BOUNDARY




More information about the asterisk-commits mailing list