[asterisk-commits] bbryant: branch 1.8 r284781 - in /branches/1.8: ./ main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 2 16:04:55 CDT 2010


Author: bbryant
Date: Thu Sep  2 16:04:51 2010
New Revision: 284781

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=284781
Log:
Merged revisions 284778 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r284778 | bbryant | 2010-09-02 16:54:33 -0400 (Thu, 02 Sep 2010) | 14 lines
  
  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.8/   (props changed)
    branches/1.8/main/manager.c

Propchange: branches/1.8/
------------------------------------------------------------------------------
Binary property 'branch-1.6.2-merged' - no diff available.

Modified: branches/1.8/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/manager.c?view=diff&rev=284781&r1=284780&r2=284781
==============================================================================
--- branches/1.8/main/manager.c (original)
+++ branches/1.8/main/manager.c Thu Sep  2 16:04:51 2010
@@ -850,11 +850,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;
 static char *manager_channelvars;
@@ -6131,7 +6139,7 @@
 	struct ast_config *ucfg = NULL, *cfg = NULL;
 	const char *val;
 	char *cat = NULL;
-	int newhttptimeout = 60;
+	int newhttptimeout = DEFAULT_HTTPTIMEOUT;
 	struct ast_manager_user *user = NULL;
 	struct ast_variable *var;
 	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
@@ -6139,8 +6147,6 @@
 	char a1_hash[256];
 	struct sockaddr_in ami_desc_local_address_tmp = { 0, };
 	struct sockaddr_in amis_desc_local_address_tmp = { 0, };
-
-	manager_enabled = 0;
 
 	if (!registered) {
 		/* Register default actions */
@@ -6188,8 +6194,14 @@
 		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 asterisk-commits mailing list