Browse code

core: efectively run the event_route[core:receive-parse-error]

- reported by Juha Heinanen

Daniel-Constantin Mierla authored on 22/08/2013 15:51:49
Showing 1 changed files
... ...
@@ -61,10 +61,19 @@ void sr_core_ert_init(void)
61 61
  */
62 62
 void sr_core_ert_run(sip_msg_t *msg, int e)
63 63
 {
64
+	struct run_act_ctx ctx;
65
+	int rtb;
66
+
64 67
 	switch(e) {
65 68
 		case SR_CORE_ERT_RECEIVE_PARSE_ERROR:
66 69
 			if(likely(_sr_core_ert_list.init_parse_error<=0))
67 70
 				return;
71
+			rtb = get_route_type();
72
+			set_route_type(REQUEST_ROUTE);
73
+			init_run_actions_ctx(&ctx);
74
+			run_top_route(event_rt.rlist[_sr_core_ert_list.init_parse_error],
75
+					msg, &ctx);
76
+			set_route_type(rtb);
68 77
 		break;
69 78
 	}
70 79
 }