]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Reset peer outboundproxy on sip.conf reload
authorRussell Bryant <russell@russellbryant.com>
Wed, 11 Dec 2013 19:11:10 +0000 (19:11 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 11 Dec 2013 19:11:10 +0000 (19:11 +0000)
If you set a peer's outboundproxy and then removed it from the config,
this would not get picked up in a config reload.  This patch fixes that
by resetting it in set_peer_defaults().

Closes ASTERISK-19454
Review: https://reviewboard.asterisk.org/r/3065/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@403634 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 6ae5e17ec0437352746b94436170b261cce91068..9fbad1787e32e677a72950b00fbc3e26349612a8 100644 (file)
@@ -27990,6 +27990,10 @@ static void set_peer_defaults(struct sip_peer *peer)
        peer->disallowed_methods = sip_cfg.disallowed_methods;
        peer->transports = default_transports;
        peer->default_outbound_transport = default_primary_transport;
+       if (peer->outboundproxy) {
+               ao2_ref(peer->outboundproxy, -1);
+               peer->outboundproxy = NULL;
+       }
 }
 
 /*! \brief Create temporary peer (used in autocreatepeer mode) */