Browse code

core: print cfg line for failed eval expressions

Daniel-Constantin Mierla authored on 27/01/2011 23:02:47
Showing 1 changed files
... ...
@@ -395,7 +395,8 @@ int lval_assign(struct run_act_ctx* h, struct sip_msg* msg,
395 395
 	}
396 396
 	switch(lv->type){
397 397
 		case LV_NONE:
398
-			BUG("uninitialized/invalid lvalue (%d)\n", lv->type);
398
+			BUG("uninitialized/invalid lvalue (%d) (cfg line: %d)\n",
399
+					lv->type, rve->fpos.s_line);
399 400
 			goto error;
400 401
 		case LV_AVP:
401 402
 			ret=lval_avp_assign(h, msg, lv, rv);
... ...
@@ -404,6 +405,11 @@ int lval_assign(struct run_act_ctx* h, struct sip_msg* msg,
404 404
 			ret=lval_pvar_assign(h, msg, lv, rv);
405 405
 			break;
406 406
 	}
407
+	if (unlikely(ret<0)){
408
+		ERR("assignmet failed at pos: (%d,%d-%d,%d)\n",
409
+			rve->fpos.s_line, rve->fpos.s_col,
410
+			rve->fpos.e_line, rve->fpos.e_col);
411
+	}
407 412
 	rval_destroy(rv);
408 413
 	return ret;
409 414
 error: