diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-01 20:19:08 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-01 20:19:08 +0000 |
commit | 0b7becf15c19f31ac98c15a6e5d973fd1823e529 (patch) | |
tree | 81803ec177a2a1f5798dc8ea808e1b6e0545ac5d | |
parent | bb505e4e57dadf17793432ca0d62538cc5c2bdb9 (diff) |
Fixes issue with non dynamic hosts not being set for peers
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@221712 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 0b79aa02d..afa65ba33 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -21453,18 +21453,18 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str peer->defaddr.sin_port = peer->addr.sin_port; peer->addr.sin_port = 0; } - peer->host_dynamic = TRUE; - } else { - /* Non-dynamic. Make sure we become that way if we're not */ - AST_SCHED_DEL(sched, peer->expire); - peer->host_dynamic = FALSE; - srvlookup = v->value; - if (global_dynamic_exclude_static) { - int err = 0; - global_contact_ha = ast_append_ha("deny", (char *)ast_inet_ntoa(peer->addr.sin_addr), global_contact_ha, &err); - if (err) { - ast_log(LOG_ERROR, "Bad ACL entry in configuration line %d : %s\n", v->lineno, v->value); - } + } + peer->host_dynamic = TRUE; + } else { + /* Non-dynamic. Make sure we become that way if we're not */ + AST_SCHED_DEL(sched, peer->expire); + peer->host_dynamic = FALSE; + srvlookup = v->value; + if (global_dynamic_exclude_static) { + int err = 0; + global_contact_ha = ast_append_ha("deny", (char *)ast_inet_ntoa(peer->addr.sin_addr), global_contact_ha, &err); + if (err) { + ast_log(LOG_ERROR, "Bad ACL entry in configuration line %d : %s\n", v->lineno, v->value); } } } |