aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-07 21:36:47 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-07 21:36:47 +0000
commitbe8c461279432fe91d4e9b7bace920de78a4f928 (patch)
tree11109ffee66f720b296168e08df3fad4f84da11d /channels/chan_sip.c
parentf9fe842860b9362a8003a67ad2f01ba4e90f4dd9 (diff)
Merged revisions 113241 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r113241 | jpeeler | 2008-04-07 16:35:48 -0500 (Mon, 07 Apr 2008) | 23 lines Merged revisions 113013 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r113013 | jpeeler | 2008-04-07 10:18:10 -0500 (Mon, 07 Apr 2008) | 15 lines Merged revisions 113012 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r113012 | jpeeler | 2008-04-07 10:16:44 -0500 (Mon, 07 Apr 2008) | 7 lines (closes issue #12362) (closes issue #12372) Reported by: vinsik Tested by: tecnoxarxa This one line change makes an if inside a for loop (in realtime_peer) check all the ast_variables the loop was intending to test rather than just the first one. ........ ................ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@113242 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 0c3d84c27..0f77ec294 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3576,9 +3576,9 @@ static struct sip_peer *realtime_peer(const char *newpeername, struct sockaddr_i
* is because we only have the IP address and the host field might be
* set as a name (and the reverse PTR might not match).
*/
- if (var) {
+ if (var && sin) {
for (tmp = var; tmp; tmp = tmp->next) {
- if (!strcasecmp(var->name, "host")) {
+ if (!strcasecmp(tmp->name, "host")) {
struct hostent *hp;
struct ast_hostent ahp;
if (!(hp = ast_gethostbyname(tmp->value, &ahp)) || (memcmp(&hp->h_addr, &sin->sin_addr, sizeof(hp->h_addr)))) {