From: Russell Bryant Date: Wed, 11 Dec 2013 19:14:52 +0000 (+0000) Subject: Reset peer outboundproxy on sip.conf reload X-Git-Tag: 11.8.0-rc1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=788dccff42a8854c55b41356b31eeb6da99cf039;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/ ........ Merged revisions 403634 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@403635 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 229da64d53..414cf89b2c 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -30416,6 +30416,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) */