mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 11:42:27 +00:00
Add option 'keepstats' which will keep queue statistics during a reload. (issue #7908 reported by jmls)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -17,3 +17,5 @@ Changes since Asterisk 1.4-beta was branched:
|
|||||||
can use --with-cap to specify the path.
|
can use --with-cap to specify the path.
|
||||||
* H323 remote hold notification support added (by NOTIFY message
|
* H323 remote hold notification support added (by NOTIFY message
|
||||||
and/or H.450 supplementary service)
|
and/or H.450 supplementary service)
|
||||||
|
* Added keepstats option to queues.conf which will keep queue
|
||||||
|
statistics during a reload.
|
||||||
|
@@ -237,6 +237,9 @@ static const char *pm_family = "/Queue/PersistentMembers";
|
|||||||
/* The maximum length of each persistent member queue database entry */
|
/* The maximum length of each persistent member queue database entry */
|
||||||
#define PM_MAX_LEN 8192
|
#define PM_MAX_LEN 8192
|
||||||
|
|
||||||
|
/*! \brief queues.conf [general] option */
|
||||||
|
static int queue_keep_stats = 0;
|
||||||
|
|
||||||
/*! \brief queues.conf [general] option */
|
/*! \brief queues.conf [general] option */
|
||||||
static int queue_persistent_members = 0;
|
static int queue_persistent_members = 0;
|
||||||
|
|
||||||
@@ -3699,6 +3702,9 @@ static int reload_queues(void)
|
|||||||
while ((cat = ast_category_browse(cfg, cat)) ) {
|
while ((cat = ast_category_browse(cfg, cat)) ) {
|
||||||
if (!strcasecmp(cat, "general")) {
|
if (!strcasecmp(cat, "general")) {
|
||||||
/* Initialize global settings */
|
/* Initialize global settings */
|
||||||
|
queue_keep_stats = 0;
|
||||||
|
if ((general_val = ast_variable_retrieve(cfg, "general", "keepstats")))
|
||||||
|
queue_keep_stats = ast_true(general_val);
|
||||||
queue_persistent_members = 0;
|
queue_persistent_members = 0;
|
||||||
if ((general_val = ast_variable_retrieve(cfg, "general", "persistentmembers")))
|
if ((general_val = ast_variable_retrieve(cfg, "general", "persistentmembers")))
|
||||||
queue_persistent_members = ast_true(general_val);
|
queue_persistent_members = ast_true(general_val);
|
||||||
@@ -3728,7 +3734,8 @@ static int reload_queues(void)
|
|||||||
ast_mutex_lock(&q->lock);
|
ast_mutex_lock(&q->lock);
|
||||||
/* Re-initialize the queue, and clear statistics */
|
/* Re-initialize the queue, and clear statistics */
|
||||||
init_queue(q);
|
init_queue(q);
|
||||||
clear_queue(q);
|
if (!queue_keep_stats)
|
||||||
|
clear_queue(q);
|
||||||
for (cur = q->members; cur; cur = cur->next) {
|
for (cur = q->members; cur; cur = cur->next) {
|
||||||
if (!cur->dynamic) {
|
if (!cur->dynamic) {
|
||||||
cur->delme = 1;
|
cur->delme = 1;
|
||||||
|
@@ -8,6 +8,11 @@
|
|||||||
; read into their recorded queues. Default is 'yes'.
|
; read into their recorded queues. Default is 'yes'.
|
||||||
;
|
;
|
||||||
persistentmembers = yes
|
persistentmembers = yes
|
||||||
|
;
|
||||||
|
; Keep Stats
|
||||||
|
; Keep queue statistics during a reload. Default is 'no'
|
||||||
|
;
|
||||||
|
keepstats = no
|
||||||
;
|
;
|
||||||
; AutoFill Behavior
|
; AutoFill Behavior
|
||||||
; The old/current behavior of the queue has a serial type behavior
|
; The old/current behavior of the queue has a serial type behavior
|
||||||
|
Reference in New Issue
Block a user