Module: sip-router Branch: master Commit: f68e9fe0ef0b84e78532e144de2b1ea5c418bbd5 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f68e9fe0...
Author: Marius Zbihlei marius.zbihlei@1and1.ro Committer: Marius Zbihlei marius.zbihlei@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 (cherry picked from commit 6c51d903f5a314f4116df81121d1faa5ea8c95d3)
---
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 207562d..a6da6e2 100644 --- a/modules/carrierroute/cr_func.c +++ b/modules/carrierroute/cr_func.c @@ -103,12 +103,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;