[sr-dev] git:master: Do some debug output, when searching for user based on IP/Port/ Proto.

admin at sip-router.org admin at sip-router.org
Fri Aug 16 17:08:31 CEST 2013


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

Author: Carsten Bock <carsten at ng-voice.com>
Committer: Carsten Bock <carsten at ng-voice.com>
Date:   Fri Aug 16 17:08:15 2013 +0200

Do some debug output, when searching for user based on IP/Port/Proto.

---

 modules/ims_usrloc_pcscf/udomain.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/modules/ims_usrloc_pcscf/udomain.c b/modules/ims_usrloc_pcscf/udomain.c
index f82c941..ef15bea 100644
--- a/modules/ims_usrloc_pcscf/udomain.c
+++ b/modules/ims_usrloc_pcscf/udomain.c
@@ -443,10 +443,19 @@ int get_pcontact_by_src(udomain_t* _d, str * _host, unsigned short _port, unsign
 	{
 		c = _d->table[i].first;
 		while(c) {
+			LM_DBG("Port %d (search %d), Proto %d (search %d), reg_state %s (search %s)\n",
+				c->received_port, _port, c->received_proto, _proto, 
+				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)) {
+				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) {
+					LM_DBG("Received host %.*s (search %.*s)\n",
+						c->received_host.len, c->received_host.s,
+						_host->len, _host->s);
+
 					// Finally really compare the "received_host"
 					if (!memcmp(c->received_host.s, _host->s, _host->len)) {
 						*_c = c;




More information about the sr-dev mailing list