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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 22 18:00:19 CDT 2009


Author: mmichelson
Date: Thu Oct 22 18:00:15 2009
New Revision: 225560

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=225560
Log:
Do a bit of sanitization of the dynamic logger stuff.


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

Modified: team/group/CCSS/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=225560&r1=225559&r2=225560
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Thu Oct 22 18:00:15 2009
@@ -223,10 +223,6 @@
 	unsigned long match_flags = *(unsigned long *)data;
 	int possible_match = 0;
 
-	ast_log_dynamic_level(cc_logger_level, "Iterating on %s, monitor is %p, and flags is %lu\n",
-			core_instance->agent->interface, core_instance->monitor, match_flags);
-	ast_log_dynamic_level(cc_logger_level, "Oh and I'm searching for %s\n", name);
-
 	if ((match_flags & MATCH_NO_MONITOR) && !core_instance->monitor) {
 		possible_match = 1;
 	}
@@ -638,7 +634,7 @@
 	AST_RWLIST_RDLOCK(&cc_monitor_backends);
 	AST_RWLIST_TRAVERSE(&cc_monitor_backends, backend, next) {
 		if (!strcmp(backend->callbacks->type, type)) {
-			ast_log_dynamic_level(cc_logger_level, "Returning backend %s\n", backend->callbacks->type);
+			ast_log_dynamic_level(cc_logger_level, "Returning monitor backend %s\n", backend->callbacks->type);
 			callbacks = backend->callbacks;
 			break;
 		}
@@ -696,7 +692,7 @@
 	AST_RWLIST_RDLOCK(&cc_agent_backends);
 	AST_RWLIST_TRAVERSE(&cc_agent_backends, backend, next) {
 		if (!strcmp(backend->callbacks->type, type)) {
-			ast_log_dynamic_level(cc_logger_level, "Returning backend %s\n", backend->callbacks->type);
+			ast_log_dynamic_level(cc_logger_level, "Returning agent backend %s\n", backend->callbacks->type);
 			callbacks = backend->callbacks;
 			break;
 		}
@@ -884,7 +880,7 @@
 static void cc_extension_monitor_destructor(void *monitor)
 {
 	struct ast_cc_monitor *mon = monitor;
-	ast_log_dynamic_level(cc_logger_level, "Calling destructor for monitor %s\n", mon->interface->name);
+	ast_log_dynamic_level(cc_logger_level, "Destructor called for monitor %s\n", mon->interface->name);
 	return;
 }
 
@@ -1792,7 +1788,7 @@
 		return NULL;
 	}
 	agent->interface_tree = cc_ref(interface_tree, "Agent now has reference to interface tree");
-	ast_log_dynamic_level(cc_logger_level, "I created an agent with core_id %d and caller %s\n", agent->core_id, agent->interface);
+	ast_log_dynamic_level(cc_logger_level, "Created an agent with core_id %d and caller %s\n", agent->core_id, agent->interface);
 	return agent;
 }
 
@@ -1878,7 +1874,7 @@
 	ast_assert(agent->cc_params != NULL);
 
 	when = ast_get_cc_offer_timer(agent->cc_params) * 1000;
-	ast_log_dynamic_level(cc_logger_level, "About to schedule timer expiration for %d ms\n", when);
+	ast_log_dynamic_level(cc_logger_level, "About to schedule offer timer expiration for %d ms\n", when);
 	if ((sched_id = ast_sched_thread_add(cc_sched_thread, when, offer_timer_expire, agent)) == -1) {
 		return -1;
 	}
@@ -1971,7 +1967,7 @@
 		return NULL;
 	}
 	if (!ast_strlen_zero(callback_macro)) {
-		ast_log_dynamic_level(cc_logger_level, "There's a callback macro configured\n");
+		ast_log_dynamic_level(cc_logger_level, "There's a callback macro configured for agent %s\n", agent->interface);
 		if (ast_app_run_macro(NULL, chan, callback_macro, NULL)) {
 			ast_cc_failed(agent->core_id, "Callback macro failed. Maybe a hangup?");
 			ast_hangup(chan);
@@ -2292,7 +2288,7 @@
 	 */
 	AST_LIST_TRAVERSE(&monitor->parent_links, link, next_parent) {
 		if (!link->is_suspended) {
-			ast_log_dynamic_level(cc_logger_level, "Selected link with core_id %d\n", link->core_id);
+			ast_log_dynamic_level(cc_logger_level, "Selected link with core_id %d for passing up availability\n", link->core_id);
 			break;
 		}
 	}
@@ -2420,10 +2416,10 @@
 		}
 		core_instance->current_state = args->state;
 		if (core_instance->agent->callbacks->status_request(core_instance->agent) == AST_DEVICE_NOT_INUSE) {
-			ast_log_dynamic_level(cc_logger_level, "Both parties are ready, let's try that recall\n");
+			ast_log_dynamic_level(cc_logger_level, "Both parties are ready. Attempting recall\n");
 			cc_request_state_change(CC_RECALLING, core_instance->core_id, "Both parties are available\n");
 		} else {
-			ast_log_dynamic_level(cc_logger_level, "Caller has become busy, so we must begin monitoring him\n");
+			ast_log_dynamic_level(cc_logger_level, "Caller %s has become busy, begin monitoring\n", core_instance->agent->interface);
 			cc_request_state_change(CC_CALLER_BUSY, core_instance->core_id, "Caller is busy\n");
 		}
 		break;
@@ -2509,7 +2505,6 @@
 	args->core_id = core_id;
 	strcpy(args->debug, debug);
 
-	ast_log_dynamic_level(cc_logger_level, "Placing request for state change to state %d\n", state);
 	return ast_taskprocessor_push(cc_core_taskprocessor, cc_do_state_change, args);
 }
 
@@ -2756,7 +2751,7 @@
 	}
 
 	pbx_builtin_setvar_helper(chan, "CC_INTERFACES", ast_str_buffer(var_value));
-	ast_log_dynamic_level(cc_logger_level, "I set CC_INTERFACES to %s\n", ast_str_buffer(var_value));
+	ast_log_dynamic_level(cc_logger_level, "CC_INTERFACES set to %s\n", ast_str_buffer(var_value));
 	ast_channel_unlock(chan);
 	ast_free(var_value);
 	return 0;




More information about the asterisk-commits mailing list