Module: sip-router
Branch: master
Commit: fd68623bebb7053f4b652d7fe58d676b6a019d7c
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fd68623…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Aug 22 17:51:49 2013 +0200
core: efectively run the event_route[core:receive-parse-error]
- reported by Juha Heinanen
---
events.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/events.c b/events.c
index ae4fead..a72eb93 100644
--- a/events.c
+++ b/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;
}
}