[asterisk-commits] twilson: trunk r288573 - in /trunk: ./ main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 23 13:08:27 CDT 2010


Author: twilson
Date: Thu Sep 23 13:08:23 2010
New Revision: 288573

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

........
  r288572 | twilson | 2010-09-23 13:05:16 -0500 (Thu, 23 Sep 2010) | 2 lines
  
  Make AMI honor enabled=no
........

Modified:
    trunk/   (props changed)
    trunk/main/manager.c

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

Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=288573&r1=288572&r2=288573
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Thu Sep 23 13:08:23 2010
@@ -6205,6 +6205,8 @@
 
 	/* default values */
 	ast_copy_string(global_realm, S_OR(ast_config_AST_SYSTEM_NAME, DEFAULT_REALM), sizeof(global_realm));
+	memset(&ami_desc.local_address, 0, sizeof(struct sockaddr_in));
+	memset(&amis_desc.local_address, 0, sizeof(amis_desc.local_address));
 	amis_desc_local_address_tmp.sin_port = htons(5039);
 	ami_desc_local_address_tmp.sin_port = htons(DEFAULT_MANAGER_PORT);
 
@@ -6289,8 +6291,10 @@
 		    ami_desc_local_address_tmp.sin_addr;
 	}
 
-	ast_sockaddr_from_sin(&ami_desc.local_address, &ami_desc_local_address_tmp);
-	ast_sockaddr_from_sin(&amis_desc.local_address, &amis_desc_local_address_tmp);
+	if (manager_enabled) {
+		ast_sockaddr_from_sin(&ami_desc.local_address, &ami_desc_local_address_tmp);
+		ast_sockaddr_from_sin(&amis_desc.local_address, &amis_desc_local_address_tmp);
+	}
 
 	AST_RWLIST_WRLOCK(&users);
 




More information about the asterisk-commits mailing list