[asterisk-commits] jrose: branch jrose/call_identifiers r360090 - in /team/jrose/call_identifier...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 21 09:07:27 CDT 2012


Author: jrose
Date: Wed Mar 21 09:07:23 2012
New Revision: 360090

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=360090
Log:
Changes callid from 6 digit decimal to 8 digit hex

Modified:
    team/jrose/call_identifiers/include/asterisk/logger.h
    team/jrose/call_identifiers/main/logger.c

Modified: team/jrose/call_identifiers/include/asterisk/logger.h
URL: http://svnview.digium.com/svn/asterisk/team/jrose/call_identifiers/include/asterisk/logger.h?view=diff&rev=360090&r1=360089&r2=360090
==============================================================================
--- team/jrose/call_identifiers/include/asterisk/logger.h (original)
+++ team/jrose/call_identifiers/include/asterisk/logger.h Wed Mar 21 09:07:23 2012
@@ -68,7 +68,7 @@
 	it just include a call_id argument as well. If NULL is specified here, no attempt will be made to
 	join the log message with a call_id.
 
- 	\param level	Type of log event
+	\param level	Type of log event
 	\param file	Will be provided by the AST_LOG_* macro
 	\param line	Will be provided by the AST_LOG_* macro
 	\param function	Will be provided by the AST_LOG_* macro

Modified: team/jrose/call_identifiers/main/logger.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/call_identifiers/main/logger.c?view=diff&rev=360090&r1=360089&r2=360090
==============================================================================
--- team/jrose/call_identifiers/main/logger.c (original)
+++ team/jrose/call_identifiers/main/logger.c Wed Mar 21 09:07:23 2012
@@ -1018,10 +1018,10 @@
 	if (!AST_RWLIST_EMPTY(&logchannels)) {
 		AST_RWLIST_TRAVERSE(&logchannels, chan, list) {
 			/* XXX May need to grow larger later in order to accomodate call counts higher than 999999. */
-			char call_identifier_str[10] = "";
+			char call_identifier_str[13] = "";
 
 			if (logmsg->callid) {
-				snprintf(call_identifier_str, sizeof(call_identifier_str), "[C%06d]", logmsg->callid->call_identifier);
+				snprintf(call_identifier_str, sizeof(call_identifier_str), "[C-%08x]", logmsg->callid->call_identifier);
 			}
 
 
@@ -1244,7 +1244,7 @@
 	using = ast_atomic_fetchadd_int(&next_unique_callid, +1);
 
 	call->call_identifier = using;
-	ast_log(LOG_DEBUG, "CALL_ID [C%06d] created by thread.\n", call->call_identifier);
+	ast_log(LOG_DEBUG, "CALL_ID [C-%08x] created by thread.\n", call->call_identifier);
 	return call;
 }
 
@@ -1272,7 +1272,7 @@
 	if (!(*pointing)) {
 		ast_callid_ref(callid);
 		*pointing = callid;
-		ast_log(LOG_DEBUG, "CALL_ID [C%06d] bound to thread.\n", callid->call_identifier);
+		ast_log(LOG_DEBUG, "CALL_ID [C-%08x] bound to thread.\n", callid->call_identifier);
 		/* callid will be unreffed at thread destruction */
 	} else {
 		ast_log(LOG_WARNING, "Attempted to ast_callid_threadassoc_add on thread already associated with a callid.\n");




More information about the asterisk-commits mailing list