Fix realtime in SIP (bug #3332)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2005-01-13 20:26:33 +00:00
parent 278a0a0891
commit 9811d4502f

View File

@@ -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;
}