ソースを参照

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

- reported by Juha Heinanen
Daniel-Constantin Mierla 12 年 前
コミット
fd68623beb
1 ファイル変更9 行追加0 行削除
  1. 9 0
      events.c

+ 9 - 0
events.c

@@ -61,10 +61,19 @@ void sr_core_ert_init(void)
  */
 void sr_core_ert_run(sip_msg_t *msg, int e)
 {
+	struct run_act_ctx ctx;
+	int rtb;
+
 	switch(e) {
 		case SR_CORE_ERT_RECEIVE_PARSE_ERROR:
 			if(likely(_sr_core_ert_list.init_parse_error<=0))
 				return;
+			rtb = get_route_type();
+			set_route_type(REQUEST_ROUTE);
+			init_run_actions_ctx(&ctx);
+			run_top_route(event_rt.rlist[_sr_core_ert_list.init_parse_error],
+					msg, &ctx);
+			set_route_type(rtb);
 		break;
 	}
 }