From: Mark Spencer Date: Thu, 13 Jan 2005 20:26:33 +0000 (+0000) Subject: Fix realtime in SIP (bug #3332) X-Git-Tag: 1.2.0-beta1~1402 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9811d4502f09fc4f913010ac0d1d2c65afd6512c;p=thirdparty%2Fasterisk.git Fix realtime in SIP (bug #3332) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4783 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d8cc023cfb..af185bfaba 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1135,14 +1135,11 @@ static struct sip_peer *realtime_peer(const char *peername, struct sockaddr_in * tmp = var; while(tmp) { - if (strcasecmp(tmp->name, "type")) - continue; - - if (!strcasecmp(tmp->value, "user")) { + if (!strcasecmp(tmp->name, "type") && + !strcasecmp(tmp->value, "user")) { ast_destroy_realtime(var); return NULL; } - tmp = tmp->next; } @@ -1207,10 +1204,8 @@ static struct sip_user *realtime_user(const char *username) tmp = var; while (tmp) { - if (strcasecmp(tmp->name, "type")) - continue; - - if (!strcasecmp(tmp->value, "peer")) { + if (!strcasecmp(tmp->name, "type") && + !strcasecmp(tmp->value, "peer")) { ast_destroy_realtime(var); return NULL; }