dect
/
asterisk
Archived
13
0
Fork 0

If unregistered, don't consider it valid (bug #956)

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2105 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
markster 2004-02-01 23:55:17 +00:00
parent afbbafd633
commit 153c95a7a6
1 changed files with 3 additions and 2 deletions

View File

@ -844,7 +844,8 @@ static int create_addr(struct sip_pvt *r, char *peer)
r->sa.sin_port = p->defaddr.sin_port;
}
memcpy(&r->recv, &r->sa, sizeof(r->recv));
}
} else
p = NULL;
}
ast_mutex_unlock(&peerl.lock);
if (!p && !found) {
@ -5663,7 +5664,7 @@ static int sip_send_mwi_to_peer(struct sip_peer *peer)
strncpy(name, peer->name, sizeof(name) - 1);
peer->lastmsgssent = ((newmsgs << 8) | (oldmsgs));
ast_mutex_unlock(&peerl.lock);
if (create_addr(p, name) || !p->sa.sin_addr.s_addr || !p->sa.sin_port) {
if (create_addr(p, name)) {
/* Maybe they're not registered, etc. */
sip_destroy(p);
return 0;