From: Russell Bryant Date: Wed, 11 Dec 2013 19:11:10 +0000 (+0000) Subject: Reset peer outboundproxy on sip.conf reload X-Git-Tag: 1.8.26.0-rc1~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=890da50cb797bd7a9b6c1fd5a7154715e869b477;p=thirdparty%2Fasterisk.git Reset peer outboundproxy on sip.conf reload 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 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 6ae5e17ec0..9fbad1787e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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) */