From bbcf0052fd8e351d803e331c52dc59a74d8d3309 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Mon, 18 May 2009 13:37:20 +0000 Subject: [PATCH] Merged revisions 195089 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r195089 | file | 2009-05-18 10:36:17 -0300 (Mon, 18 May 2009) | 5 lines Fix a bug where specifying an empty outboundproxy would cause packets to get sent to ourself. (closes issue #15106) Reported by: timeshell ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@195090 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index ee887d2a77..ec1deda5ea 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2399,6 +2399,11 @@ static int proxy_update(struct sip_proxy *proxy) static struct sip_proxy *proxy_allocate(char *name, char *port, int force) { struct sip_proxy *proxy; + + if (ast_strlen_zero(name)) { + return NULL; + } + proxy = ast_calloc(1, sizeof(*proxy)); if (!proxy) return NULL;