Browse Source

modules/ims_usrloc_pcscf: search for contacts should not be based on reg_state
- up to consumer to check state of contact

Jason Penton 11 years ago
parent
commit
da2e3d712c
1 changed files with 2 additions and 4 deletions
  1. 2 4
      modules/ims_usrloc_pcscf/udomain.c

+ 2 - 4
modules/ims_usrloc_pcscf/udomain.c

@@ -538,9 +538,7 @@ int get_pcontact_by_src(udomain_t* _d, str * _host, unsigned short _port, unsign
 					s_contact.s);
 					s_contact.s);
 
 
 			// First check, if Proto and Port matches:
 			// First check, if Proto and Port matches:
-			if ((c->reg_state == PCONTACT_REGISTERED)
-					&& (c->received_port == _port)
-					&& (c->received_proto == _proto)) {
+			if ((c->received_port == _port) && (c->received_proto == _proto)) {
 				LM_DBG("Received host len %d (search %d)\n", c->received_host.len, _host->len);
 				LM_DBG("Received host len %d (search %d)\n", c->received_host.len, _host->len);
 				// Then check the length:
 				// Then check the length:
 				if (c->received_host.len == _host->len) {
 				if (c->received_host.len == _host->len) {
@@ -568,7 +566,7 @@ int get_pcontact_by_src(udomain_t* _d, str * _host, unsigned short _port, unsign
 					reg_state_to_string(c->reg_state), reg_state_to_string(PCONTACT_REGISTERED)
 					reg_state_to_string(c->reg_state), reg_state_to_string(PCONTACT_REGISTERED)
 					);
 					);
 				// First check, if Proto and Port matches:
 				// First check, if Proto and Port matches:
-				if ((c->reg_state == PCONTACT_REGISTERED) && (c->received_port == _port) && (c->received_proto == _proto)) {
+				if ((c->received_port == _port) && (c->received_proto == _proto)) {
 					LM_DBG("Received host len %d (search %d)\n", c->received_host.len, _host->len);
 					LM_DBG("Received host len %d (search %d)\n", c->received_host.len, _host->len);
 					// Then check the length:
 					// Then check the length:
 					if (c->received_host.len == _host->len) {
 					if (c->received_host.len == _host->len) {