Make all address comparisons explicit

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2003-04-08 23:02:36 +00:00
parent 7f844be5e0
commit 2758349cae
4 changed files with 17 additions and 11 deletions

View File

@@ -2662,7 +2662,7 @@ static int parse_contact(struct sip_pvt *pvt, struct sip_peer *p, struct sip_req
expiry = max_expiry;
p->expire = ast_sched_add(sched, (expiry + 10) * 1000, expire_register, p);
pvt->expiry = expiry;
if (memcmp(&p->addr, &oldsin, sizeof(oldsin))) {
if (inaddrcmp(&p->addr, &oldsin)) {
sip_poke_peer(p);
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Registered SIP '%s' at %s port %d expires %d\n", p->username, inet_ntoa(p->addr.sin_addr), ntohs(p->addr.sin_port), expiry);
@@ -3203,7 +3203,7 @@ static int check_user(struct sip_pvt *p, struct sip_request *req, char *cmd, cha
ast_pthread_mutex_lock(&peerl.lock);
peer = peerl.peers;
while(peer) {
if (!memcmp(&peer->addr, &p->recv, sizeof(peer->addr))) {
if (!inaddrcmp(&peer->addr, &p->recv)) {
/* Take the peer */
p->nat = peer->nat;
if (p->rtp) {