[svn-commits] mmichelson: branch group/CCSS r248650 - in /team/group/CCSS: funcs/ include/a...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Feb 24 15:31:20 CST 2010


Author: mmichelson
Date: Wed Feb 24 15:31:15 2010
New Revision: 248650

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=248650
Log:
Address a batch of comments on reviewboard.

One more of these and I'll post a new diff there.


Modified:
    team/group/CCSS/funcs/func_callcompletion.c
    team/group/CCSS/include/asterisk/ccss.h
    team/group/CCSS/include/asterisk/channel.h
    team/group/CCSS/include/asterisk/channelstate.h
    team/group/CCSS/main/ccss.c

Modified: team/group/CCSS/funcs/func_callcompletion.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/funcs/func_callcompletion.c?view=diff&rev=248650&r1=248649&r2=248650
==============================================================================
--- team/group/CCSS/funcs/func_callcompletion.c (original)
+++ team/group/CCSS/funcs/func_callcompletion.c Wed Feb 24 15:31:15 2010
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2009, Digium, Inc.
+ * Copyright (C) 1999 - 2010, Digium, Inc.
  *
  * Mark Michelson <mmichelson at digium.com>
  *

Modified: team/group/CCSS/include/asterisk/ccss.h
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/include/asterisk/ccss.h?view=diff&rev=248650&r1=248649&r2=248650
==============================================================================
--- team/group/CCSS/include/asterisk/ccss.h (original)
+++ team/group/CCSS/include/asterisk/ccss.h Wed Feb 24 15:31:15 2010
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2009, Digium, Inc.
+ * Copyright (C) 1999 - 2010, Digium, Inc.
  *
  * Mark Michelson <mmichelson at digium.com>
  *

Modified: team/group/CCSS/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/include/asterisk/channel.h?view=diff&rev=248650&r1=248649&r2=248650
==============================================================================
--- team/group/CCSS/include/asterisk/channel.h (original)
+++ team/group/CCSS/include/asterisk/channel.h Wed Feb 24 15:31:15 2010
@@ -518,6 +518,7 @@
 
 	/*! \brief Call a function with cc parameters as a function parameter
 	 *
+	 * \details
 	 * This is a highly specialized callback that is not likely to be needed in many
 	 * channel drivers. When dealing with a busy channel, for instance, most channel
 	 * drivers will successfully return a channel to the requester. Once called, the channel
@@ -2783,9 +2784,11 @@
  * \since 1.8
  * \brief Set up datastore with CCSS parameters for a channel
  *
- * Note that if base_params is NULL, the channel will get the default
+ * \note
+ * If base_params is NULL, the channel will get the default
  * values for all CCSS parameters.
  *
+ * \details
  * This function makes use of datastore operations on the channel, so
  * it is important to lock the channel before calling this function.
  *
@@ -2801,6 +2804,7 @@
  * \since 1.8
  * \brief Get the CCSS parameters from a channel
  *
+ * \details
  * This function makes use of datastore operations on the channel, so
  * it is important to lock the channel before calling this function.
  *
@@ -2815,6 +2819,7 @@
  * \since 1.8
  * \brief Get a device name given its channel structure
  *
+ * \details
  * A common practice in Asterisk is to determine the device being talked
  * to by dissecting the channel name. For certain channel types, this is not
  * accurate. For instance, an ISDN channel is named based on what B channel is

Modified: team/group/CCSS/include/asterisk/channelstate.h
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/include/asterisk/channelstate.h?view=diff&rev=248650&r1=248649&r2=248650
==============================================================================
--- team/group/CCSS/include/asterisk/channelstate.h (original)
+++ team/group/CCSS/include/asterisk/channelstate.h Wed Feb 24 15:31:15 2010
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2009, Digium, Inc.
+ * Copyright (C) 1999 - 2010, Digium, Inc.
  *
  * See http://www.asterisk.org for more information about
  * the Asterisk project. Please do not directly contact

Modified: team/group/CCSS/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=248650&r1=248649&r2=248650
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Wed Feb 24 15:31:15 2010
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2009, Digium, Inc.
+ * Copyright (C) 1999 - 2010, Digium, Inc.
  *
  * Mark Michelson <mmichelson at digium.com>
  *
@@ -327,7 +327,7 @@
 static struct cc_core_instance *cc_core_init_instance(struct ast_channel *caller_chan,
 		struct cc_monitor_tree *called_tree, const int core_id, struct cc_control_payload *cc_data);
 
-static struct {
+static const struct {
 	enum ast_cc_service_type service;
 	const char *service_string;
 } cc_service_to_string_map[] = {
@@ -337,7 +337,7 @@
 	{AST_CC_CCNL, "CCNL"},
 };
 
-static struct {
+static const struct {
 	enum cc_state state;
 	const char *state_string;
 } cc_state_to_string_map[] = {
@@ -651,7 +651,7 @@
 		return 0;
 	}
 
-	if (!sscanf(value, "%30d", &value_as_uint) == 1) {
+	if (!sscanf(value, "%30u", &value_as_uint) == 1) {
 		return -1;
 	}
 
@@ -883,6 +883,7 @@
 	AST_RWLIST_TRAVERSE_SAFE_BEGIN(&cc_monitor_backends, backend, next) {
 		if (backend->callbacks == callbacks) {
 			AST_RWLIST_REMOVE_CURRENT(next);
+			ast_free(backend);
 			break;
 		}
 	}
@@ -919,6 +920,7 @@
 	AST_RWLIST_TRAVERSE_SAFE_BEGIN(&cc_agent_backends, backend, next) {
 		if (backend->callbacks == callbacks) {
 			AST_RWLIST_REMOVE_CURRENT(next);
+			ast_free(backend);
 			break;
 		}
 	}
@@ -1299,9 +1301,10 @@
 
 	ast_log_dynamic_level(cc_logger_level, "Core %d: Canceling generic monitor available timer for monitor %s\n",
 			monitor->core_id, monitor->interface->device_name);
-	ast_sched_thread_del(cc_sched_thread, *sched_id);
+	if (!ast_sched_thread_del(cc_sched_thread, *sched_id)) {
+		cc_unref(monitor, "Remove scheduler's reference to the monitor");
+	}
 	*sched_id = -1;
-	cc_unref(monitor, "Remove scheduler's reference to the monitor");
 	return 0;
 }
 
@@ -2355,9 +2358,10 @@
 	struct cc_generic_agent_pvt *generic_pvt = agent->private_data;
 
 	if (generic_pvt->offer_timer_id != -1) {
-		ast_sched_thread_del(cc_sched_thread, generic_pvt->offer_timer_id);
+		if (!ast_sched_thread_del(cc_sched_thread, generic_pvt->offer_timer_id)) {
+			cc_unref(agent, "Remove scheduler's reference to the agent");
+		}
 		generic_pvt->offer_timer_id = -1;
-		cc_unref(agent, "Remove scheduler's reference to the agent");
 	}
 	return 0;
 }




More information about the svn-commits mailing list