[sr-dev] git:master:f2f789eb: modules/siputils: do not log every P -header, shortcut loop instead

Mikko Lehto mslehto at iki.fi
Mon Nov 7 10:01:26 CET 2016


Module: kamailio
Branch: master
Commit: f2f789eb40c379c9ebe12e0588e521680951e017
URL: https://github.com/kamailio/kamailio/commit/f2f789eb40c379c9ebe12e0588e521680951e017

Author: Mikko Lehto <mslehto at iki.fi>
Committer: Mikko Lehto <mslehto at iki.fi>
Date: 2016-11-07T01:48:29+02:00

modules/siputils: do not log every P -header, shortcut loop instead

---

Modified: modules/siputils/chargingvector.c

---

Diff:  https://github.com/kamailio/kamailio/commit/f2f789eb40c379c9ebe12e0588e521680951e017.diff
Patch: https://github.com/kamailio/kamailio/commit/f2f789eb40c379c9ebe12e0588e521680951e017.patch

---

diff --git a/modules/siputils/chargingvector.c b/modules/siputils/chargingvector.c
index a8e8270..51d113e 100644
--- a/modules/siputils/chargingvector.c
+++ b/modules/siputils/chargingvector.c
@@ -216,9 +216,9 @@ static int sip_get_charging_vector(struct sip_msg *msg, struct hdr_field ** hf_p
 
 	for (hf=msg->headers; hf; hf=hf->next)
 	{
-		if ( hf->name.s[0] == 'P' )
+		if ( hf->name.s[0] != 'P' )
 		{
-			LM_DBG("checking header=%.*s\n", hf->name.len, hf->name.s );
+			continue;
 		}
 
 		if ( cmp_hdrname_str(&hf->name, &hdrname) == 0)




More information about the sr-dev mailing list