[asterisk-bugs] [Asterisk 0018642]: Output of queue_log stopped after several hours

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Feb 14 02:48:33 CST 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18642 
====================================================================== 
Reported By:                eb3dgz
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18642
Category:                   Applications/app_queue
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           1.8.2.1 
JIRA:                       SWP-2952 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-01-19 05:23 CST
Last Modified:              2011-02-14 02:48 CST
====================================================================== 
Summary:                    Output of queue_log stopped after several hours
Description: 
Tested in two systems with Asterisk 1.8.2. After several hours the logger
output to queue_log is stopped and there are no more writes of statistics
in this file.

After a reload of the logger module the queue_log output starts working
well again but with the loss of the events processed while logger was not
wrinting queue_log.

This affect report statistics of queues, and is very important in call
center environments. No effect has been noted with CDR, as CDR works OK. No
call lost in CDR, only in Queue_log.
====================================================================== 

---------------------------------------------------------------------- 
 (0131919) eb3dgz (reporter) - 2011-02-14 02:48
 https://issues.asterisk.org/view.php?id=18642#c131919 
---------------------------------------------------------------------- 
This patch solve the problem. Tested in two machines for more than one week
without any problem.

--- main/logger.c	2011-02-11 10:49:55.000000000 +0100
+++ main/logger.c	2011-02-11 10:49:47.000000000 +0100
@@ -393,12 +393,13 @@
 		AST_RWLIST_INSERT_HEAD(&logchannels, chan, list);
 		global_logmask |= chan->logmask;
 	}
-	if (qlog) {
-		char tmp[4096];
+
+	if (qlog)
 		fclose(qlog);
-		snprintf(tmp, sizeof(tmp), "%s/%s", ast_config_AST_LOG_DIR,
queue_log_name);
-		qlog = fopen(tmp, "a");
-	}
+	
+	char tmp[4096];
+	snprintf(tmp, sizeof(tmp), "%s/%s", ast_config_AST_LOG_DIR,
queue_log_name);
+	qlog = fopen(tmp, "a");
 
 	if (!locked) {
 		AST_RWLIST_UNLOCK(&logchannels); 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-02-14 02:48 eb3dgz         Note Added: 0131919                          
======================================================================




More information about the asterisk-bugs mailing list