[sr-dev] git:master: dispatcher(k): improved debug message

Daniel-Constantin Mierla miconda at gmail.com
Mon Jun 4 12:29:16 CEST 2012


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Mon Jun  4 12:28:09 2012 +0200

dispatcher(k): improved debug message

- when hashing due to alg 7, print the string to be hased as well as the
  hash code for it

---

 modules_k/dispatcher/dispatch.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules_k/dispatcher/dispatch.c b/modules_k/dispatcher/dispatch.c
index ae0c51b..a60401c 100644
--- a/modules_k/dispatcher/dispatch.c
+++ b/modules_k/dispatcher/dispatch.c
@@ -1171,9 +1171,10 @@ int ds_hash_pvar(struct sip_msg *msg, unsigned int *hash)
 		LM_ERR("String is empty!\n");
 		return -1;
 	}
-	LM_DBG("Hashing %.*s!\n", hash_str.len, hash_str.s);
 
 	*hash = ds_get_hash(&hash_str, NULL);
+	LM_DBG("Hashing of '%.*s' resulted in %u !\n", hash_str.len, hash_str.s,
+			*hash);
 
 	return 0;
 }




More information about the sr-dev mailing list