From de897a6bf1c488c595184f00db15929db2802300 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 11 Dec 2013 13:04:54 -0500 Subject: [PATCH] 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. --- channels/chan_sip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 5ff8637..5252572 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -27827,6 +27827,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) */ -- 1.8.3.1