[sr-dev] git:master: modules/ims_usrloc_pcscf: search for contacts should not be based on reg_state

Jason Penton jason.penton at gmail.com
Thu Mar 13 09:08:59 CET 2014


Module: sip-router
Branch: master
Commit: da2e3d712c1025b02df6a047ba06b8d8d7d8c80a
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=da2e3d712c1025b02df6a047ba06b8d8d7d8c80a

Author: Jason Penton <jason.penton at gmail.com>
Committer: Jason Penton <jason.penton at gmail.com>
Date:   Thu Mar 13 10:08:07 2014 +0200

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

---

 modules/ims_usrloc_pcscf/udomain.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/ims_usrloc_pcscf/udomain.c b/modules/ims_usrloc_pcscf/udomain.c
index d3ba43b..31a051b 100644
--- a/modules/ims_usrloc_pcscf/udomain.c
+++ b/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);
 
 			// 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);
 				// Then check the length:
 				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)
 					);
 				// 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);
 					// Then check the length:
 					if (c->received_host.len == _host->len) {




More information about the sr-dev mailing list