diff options
author | Matthew Jordan <mjordan@digium.com> | 2014-11-09 00:38:41 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2014-11-09 00:38:41 +0000 |
commit | f4392c4b6dc96764a6bd7f6d5c5612b98a5c6fa4 (patch) | |
tree | 7ee2d60cfff99dad114e6a469ddc207bed9b5850 /channels/chan_mgcp.c | |
parent | d773f9d03e5c337045a2434314ebd8da95bdad11 (diff) |
channels/chan_mgcp: Fix regression which causes gateways to be skipped
In r227276, a while loop was turned into a for loop. Unfortunately, a portion
of the while loop was left in the code such that, when a static gateway is
encountered in the list of MGCP gateways, the next gateway would be skipped.
At best, we would simply flip past a gateway; at worst, this could lead to a
crash.
ASTERISK-24500 #close
Reported by: Xavier Hienne
patches:
chan_mgcp.patch uploaded by Xavier Hienne (License 6657)
........
Merged revisions 427613 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 427614 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 427615 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_mgcp.c')
-rw-r--r-- | channels/chan_mgcp.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index 0f6b916c1..72898b8ff 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -1835,17 +1835,12 @@ static struct mgcp_subchannel *find_subchannel_and_lock(char *name, int msgid, s /* not dynamic, check if the name matches */ } else if (name) { if (strcasecmp(g->name, at)) { - g = g->next; continue; } /* not dynamic, no name, check if the addr matches */ } else if (!name && sin) { if ((g->addr.sin_addr.s_addr != sin->sin_addr.s_addr) || (g->addr.sin_port != sin->sin_port)) { - if(!g->next) - g = find_realtime_gw(name, at, sin); - else - g = g->next; continue; } } else { |