Browse Source

Bugfix: Fix previous commit

Carsten Bock 11 years ago
parent
commit
5f5df3fda7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      modules/ims_usrloc_pcscf/udomain.c

+ 2 - 2
modules/ims_usrloc_pcscf/udomain.c

@@ -472,7 +472,7 @@ int get_pcontact(udomain_t* _d, str* _contact, struct pcontact** _c) {
 				_contact->len,
 				_contact->s);
 
-		if (lookup_check_received && (c->aorhash == aorhash) && (c->aor.len == _contact->len)
+		if ((c->aorhash == aorhash) && (c->aor.len == _contact->len)
 				&& !memcmp(c->aor.s, _contact->s, _contact->len)) {
 			*_c = c;
 			return 0;
@@ -481,7 +481,7 @@ int get_pcontact(udomain_t* _d, str* _contact, struct pcontact** _c) {
 		LM_DBG("Searching for [%.*s] and comparing to [%.*s]\n", _contact->len, _contact->s, c->aor.len, c->aor.s);
 
 		/* hosts HAVE to match */
-		if ((needle_uri.host.len != c->received_host.len) || (memcmp(needle_uri.host.s, c->contact_host.s, needle_uri.host.len)!=0)) {
+		if (lookup_check_received && (needle_uri.host.len != c->received_host.len) || (memcmp(needle_uri.host.s, c->contact_host.s, needle_uri.host.len)!=0)) {
 			//can't possibly match
 			c = c->next;
 			continue;