Module: sip-router
Branch: master
Commit: bf7cacc549e18d483a892c208cd27c9263b86c49
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bf7cacc…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Jan 28 00:02:47 2011 +0100
core: print cfg line for failed eval expressions
---
lvalue.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/lvalue.c b/lvalue.c
index a8dcbd9..bce987f 100644
--- a/lvalue.c
+++ b/lvalue.c
@@ -395,7 +395,8 @@ int lval_assign(struct run_act_ctx* h, struct sip_msg* msg,
}
switch(lv->type){
case LV_NONE:
- BUG("uninitialized/invalid lvalue (%d)\n", lv->type);
+ BUG("uninitialized/invalid lvalue (%d) (cfg line: %d)\n",
+ lv->type, rve->fpos.s_line);
goto error;
case LV_AVP:
ret=lval_avp_assign(h, msg, lv, rv);
@@ -404,6 +405,11 @@ int lval_assign(struct run_act_ctx* h, struct sip_msg* msg,
ret=lval_pvar_assign(h, msg, lv, rv);
break;
}
+ if (unlikely(ret<0)){
+ ERR("assignmet failed at pos: (%d,%d-%d,%d)\n",
+ rve->fpos.s_line, rve->fpos.s_col,
+ rve->fpos.e_line, rve->fpos.e_col);
+ }
rval_destroy(rv);
return ret;
error: