Skip to content

Commit

Permalink
tcp: checks for event route index on close
Browse files Browse the repository at this point in the history
(cherry picked from commit 46436cf)
  • Loading branch information
miconda committed Jan 8, 2020
1 parent 2c0048d commit e0420bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/modules/tcpops/tcpops.c
Expand Up @@ -239,6 +239,7 @@ static void tcpops_tcp_closed_run_route(tcp_closed_event_info_t *tev)
str *evname;

if(tcpops_event_callback.len > 0) {
rt = -1;
keng = sr_kemi_eng_get();
if(keng == NULL) {
LM_DBG("even callback set, but no kemi engine\n");
Expand All @@ -261,7 +262,11 @@ static void tcpops_tcp_closed_run_route(tcp_closed_event_info_t *tev)
set_route_type(EVENT_ROUTE);
init_run_actions_ctx(&ctx);
if(keng == NULL) {
run_top_route(event_rt.rlist[rt], fmsg, 0);
if(rt>=0) {
run_top_route(event_rt.rlist[rt], fmsg, 0);
} else {
LM_DBG("no event route block to execute\n");
}
} else {
if(tev->reason==TCP_CLOSED_TIMEOUT) {
evname = &tcpops_evrt_timeout;
Expand Down

0 comments on commit e0420bc

Please sign in to comment.