mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 02:48:29 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user