[sr-dev] git:kamailio_3.0: modules/ carrierroute Improved usefulness of error messages in case of a incorrect AVP value

Marius Zbihlei marius.zbihlei at 1and1.ro
Fri Apr 9 11:09:34 CEST 2010


Module: sip-router
Branch: kamailio_3.0
Commit: 6c51d903f5a314f4116df81121d1faa5ea8c95d3
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6c51d903f5a314f4116df81121d1faa5ea8c95d3

Author: Marius Zbihlei <marius.zbihlei at 1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei at 1and1.ro>
Date:   Fri Apr  9 12:09:33 2010 +0300

modules/carrierroute Improved usefulness of error messages in case of a incorrect AVP value

---

 modules/carrierroute/cr_func.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/modules/carrierroute/cr_func.c b/modules/carrierroute/cr_func.c
index 8effe12..d37d658 100644
--- a/modules/carrierroute/cr_func.c
+++ b/modules/carrierroute/cr_func.c
@@ -104,12 +104,11 @@ static inline int cr_gp2id(struct sip_msg *_msg, gparam_t *gp, struct name_map_t
 				id = map_name2id(map, size, &avp_val.s);
 				if (id < 0) {
 					if(gp->v.pve->spec.pvp.pvn.u.isname.type & AVP_NAME_STR)
-						LM_ERR("could not find id '%.*s' from AVP\n",
-							gp->v.pve->spec.pvp.pvn.u.isname.name.s.len,
+						LM_ERR("cannot map carrier with id %.*s from  AVP '%.*s'\n", avp_val.s.len, avp_val.s.s, gp->v.pve->spec.pvp.pvn.u.isname.name.s.len,
 							gp->v.pve->spec.pvp.pvn.u.isname.name.s.s);
 					else if(gp->v.pve->spec.pvp.pvn.u.isname.type & AVP_NAME_RE)
-						LM_ERR("could not find id regex\n");
-					else 	LM_ERR("could not find id '%d'\n", gp->v.pve->spec.pvp.pvn.u.isname.name.n);
+						LM_ERR("cannot map carrier with id %.*s from  AVP regex\n", avp_val.s.len, avp_val.s.s);
+					else 	LM_ERR("cannot map carrier with id %.*s from  AVP '%d'\n", avp_val.s.len, avp_val.s.s, gp->v.pve->spec.pvp.pvn.u.isname.name.n);
 					return -1;
 				}
 				return id;




More information about the sr-dev mailing list