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 405
 			ret=lval_pvar_assign(h, msg, lv, rv);
405 406
 			break;
406 407
 	}
408
+	if (unlikely(ret<0)){
409
+		ERR("assignmet failed at pos: (%d,%d-%d,%d)\n",
410
+			rve->fpos.s_line, rve->fpos.s_col,
411
+			rve->fpos.e_line, rve->fpos.e_col);
412
+	}
407 413
 	rval_destroy(rv);
408 414
 	return ret;
409 415
 error: