Explorar o código

prefix_route: more debug messages

- GH #4218

(cherry picked from commit 5aee159c2881aff29a2973073e1dd6c5c61bfdb9)
Daniel-Constantin Mierla hai 5 meses
pai
achega
0b39a7359b
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      src/modules/prefix_route/prefix_route.c

+ 6 - 2
src/modules/prefix_route/prefix_route.c

@@ -262,16 +262,20 @@ static int ki_prefix_route(sip_msg_t *msg, str *ruser)
 	int err;
 	int route;
 
+	LM_DBG("trying to run route block for [%.*s]\n", ruser->len, ruser->s);
 	route = tree_route_get(ruser);
-	if(route <= 0)
+	if(route <= 0) {
+		LM_DBG("route block for [%.*s] not found\n", ruser->len, ruser->s);
 		return -1;
+	}
 
 	/* If match send to route[x] */
 	init_run_actions_ctx(&ra_ctx);
 
 	err = run_actions(&ra_ctx, main_rt.rlist[route], msg);
 	if(err < 0) {
-		LM_ERR("run_actions failed (%d)\n", err);
+		LM_ERR("run actions failed (%d) for [%.*s]\n", err, ruser->len,
+				ruser->s);
 		return -1;
 	}