diff options
author | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-23 18:08:23 +0000 |
---|---|---|
committer | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-23 18:08:23 +0000 |
commit | 5783e5362d7c9f98d9a150d84b27de11d14bb028 (patch) | |
tree | 7df55816c10e8c1437267539e6ae84f6ca1346d5 /main/manager.c | |
parent | f6b4f75aacfd29b4b4d6226cb5b4e818e747a32b (diff) |
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
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@288573 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/manager.c')
-rw-r--r-- | main/manager.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/manager.c b/main/manager.c index d3c46d122..493b84360 100644 --- a/main/manager.c +++ b/main/manager.c @@ -6205,6 +6205,8 @@ static int __init_manager(int reload) /* 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 @@ static int __init_manager(int reload) 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); |