]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fixes issue with non dynamic hosts not being set for peers
authorDavid Vossel <dvossel@digium.com>
Thu, 1 Oct 2009 20:19:08 +0000 (20:19 +0000)
committerDavid Vossel <dvossel@digium.com>
Thu, 1 Oct 2009 20:19:08 +0000 (20:19 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@221712 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 0b79aa02d037637d7357c0d5bb2b97a77abcace5..afa65ba3366802a4b917074d609549654e31e562 100644 (file)
@@ -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);
                                                }
                                        }
                                }