[svn-commits] bbryant: branch 1.6.2 r284778 - in /branches/1.6.2: ./ main/manager.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Sep 2 15:54:37 CDT 2010
Author: bbryant
Date: Thu Sep 2 15:54:33 2010
New Revision: 284778
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=284778
Log:
Merged revisions 284777 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r284777 | bbryant | 2010-09-02 16:25:03 -0400 (Thu, 02 Sep 2010) | 7 lines
Fixes a bug in manager.c where the default configuration values weren't reset when the manager configuration was reloaded.
(closes issue #17917)
Reported by: lmadsen
Review: https://reviewboard.asterisk.org/r/883/
........
Modified:
branches/1.6.2/ (props changed)
branches/1.6.2/main/manager.c
Propchange: branches/1.6.2/
------------------------------------------------------------------------------
--- branch-1.4-merged (original)
+++ branch-1.4-merged Thu Sep 2 15:54:33 2010
@@ -1,1 +1,1 @@
-/branches/1.4:1-279056,279206,279945,280088,280341,280448,280811,280982,281390,281566,281762,281819,281911,282129,282430,282729,282893,283048,283123,283380,283690,283880,283960,284316,284393,284478,284703
+/branches/1.4:1-279056,279206,279945,280088,280341,280448,280811,280982,281390,281566,281762,281819,281911,282129,282430,282729,282893,283048,283123,283380,283690,283880,283960,284316,284393,284478,284703,284777
Modified: branches/1.6.2/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/manager.c?view=diff&rev=284778&r1=284777&r2=284778
==============================================================================
--- branches/1.6.2/main/manager.c (original)
+++ branches/1.6.2/main/manager.c Thu Sep 2 15:54:33 2010
@@ -120,11 +120,19 @@
static AST_RWLIST_HEAD_STATIC(all_events, eventqent);
-static int displayconnects = 1;
+static const int DEFAULT_ENABLED = 0; /*!< Default setting for manager to be enabled */
+static const int DEFAULT_WEBENABLED = 0; /*!< Default setting for the web interface to be enabled */
+static const int DEFAULT_BLOCKSOCKETS = 0; /*!< Default setting for block-sockets */
+static const int DEFAULT_DISPLAYCONNECTS = 1; /*!< Default setting for displaying manager connections */
+static const int DEFAULT_TIMESTAMPEVENTS = 0; /*!< Default setting for timestampevents */
+static const int DEFAULT_HTTPTIMEOUT = 60; /*!< Default manager http timeout */
+static const int DEFAULT_BROKENEVENTSACTION = 0; /*!< Default setting for brokeneventsaction */
+
+static int displayconnects;
static int allowmultiplelogin = 1;
static int timestampevents;
-static int httptimeout = 60;
-static int broken_events_action = 0;
+static int httptimeout;
+static int broken_events_action;
static int manager_enabled = 0;
static int webmanager_enabled = 0;
@@ -4116,16 +4124,14 @@
struct ast_config *ucfg = NULL, *cfg = NULL;
const char *val;
char *cat = NULL;
- int newhttptimeout = 60;
+ int newhttptimeout = DEFAULT_HTTPTIMEOUT;
int have_sslbindaddr = 0;
struct hostent *hp;
struct ast_hostent ahp;
struct ast_manager_user *user = NULL;
struct ast_variable *var;
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
-
- manager_enabled = 0;
-
+
if (!registered) {
/* Register default actions */
ast_manager_register2("Ping", 0, action_ping, "Keepalive command", mandescr_ping);
@@ -4170,8 +4176,14 @@
if ((cfg = ast_config_load2("manager.conf", "manager", config_flags)) == CONFIG_STATUS_FILEUNCHANGED)
return 0;
- displayconnects = 1;
- broken_events_action = 0;
+ manager_enabled = DEFAULT_ENABLED;
+ webmanager_enabled = DEFAULT_WEBENABLED;
+ displayconnects = DEFAULT_DISPLAYCONNECTS;
+ broken_events_action = DEFAULT_BROKENEVENTSACTION;
+ block_sockets = DEFAULT_BLOCKSOCKETS;
+ timestampevents = DEFAULT_TIMESTAMPEVENTS;
+ httptimeout = DEFAULT_HTTPTIMEOUT;
+
if (!cfg || cfg == CONFIG_STATUS_FILEINVALID) {
ast_log(LOG_NOTICE, "Unable to open AMI configuration manager.conf, or configuration is invalid. Asterisk management interface (AMI) disabled.\n");
return 0;
More information about the svn-commits
mailing list