[asterisk-commits] murf: branch 1.4 r140747 - /branches/1.4/main/cdr.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 2 18:36:57 CDT 2008


Author: murf
Date: Tue Sep  2 18:36:56 2008
New Revision: 140747

URL: http://svn.digium.com/view/asterisk?view=rev&rev=140747
Log:
I am turning the warnings generated in ast_cdr_free and post_cdr into verbose level 2 messages. Really, they matter little to end users. You either get the CDR's you wanted, or you don't, and it is a bug.

Modified:
    branches/1.4/main/cdr.c

Modified: branches/1.4/main/cdr.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/cdr.c?view=diff&rev=140747&r1=140746&r2=140747
==============================================================================
--- branches/1.4/main/cdr.c (original)
+++ branches/1.4/main/cdr.c Tue Sep  2 18:36:56 2008
@@ -437,12 +437,12 @@
 	while (cdr) {
 		struct ast_cdr *next = cdr->next;
 		char *chan = S_OR(cdr->channel, "<unknown>");
-		if (!ast_test_flag(cdr, AST_CDR_FLAG_POSTED) && !ast_test_flag(cdr, AST_CDR_FLAG_POST_DISABLED))
-			ast_log(LOG_NOTICE, "CDR on channel '%s' not posted\n", chan);
-		if (ast_tvzero(cdr->end))
-			ast_log(LOG_NOTICE, "CDR on channel '%s' lacks end\n", chan);
-		if (ast_tvzero(cdr->start))
-			ast_log(LOG_NOTICE, "CDR on channel '%s' lacks start\n", chan);
+		if (option_verbose > 1 && !ast_test_flag(cdr, AST_CDR_FLAG_POSTED) && !ast_test_flag(cdr, AST_CDR_FLAG_POST_DISABLED))
+			ast_verbose(VERBOSE_PREFIX_2 "CDR on channel '%s' not posted\n", chan);
+		if (option_verbose > 1 && ast_tvzero(cdr->end))
+			ast_verbose(VERBOSE_PREFIX_2 "CDR on channel '%s' lacks end\n", chan);
+		if (option_verbose > 1 && ast_tvzero(cdr->start))
+			ast_verbose(VERBOSE_PREFIX_2 "CDR on channel '%s' lacks start\n", chan);
 
 		ast_cdr_free_vars(cdr, 0);
 		free(cdr);
@@ -1015,10 +1015,10 @@
 
 		chan = S_OR(cdr->channel, "<unknown>");
 		check_post(cdr);
-		if (ast_tvzero(cdr->end))
-			ast_log(LOG_WARNING, "CDR on channel '%s' lacks end\n", chan);
-		if (ast_tvzero(cdr->start))
-			ast_log(LOG_WARNING, "CDR on channel '%s' lacks start\n", chan);
+		if (option_verbose > 1 && ast_tvzero(cdr->end))
+			ast_verbose(VERBOSE_PREFIX_2 "CDR on channel '%s' lacks end\n", chan);
+		if (option_verbose > 1 && ast_tvzero(cdr->start))
+			ast_verbose(VERBOSE_PREFIX_2 "CDR on channel '%s' lacks start\n", chan);
 		ast_set_flag(cdr, AST_CDR_FLAG_POSTED);
 		if (ast_test_flag(cdr, AST_CDR_FLAG_POST_DISABLED))
 			continue;




More information about the asterisk-commits mailing list