Skip to content

Commit

Permalink
tcp: checks for event route index on close
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Dec 10, 2019
1 parent 263b8ce commit 46436cf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/modules/tcpops/tcpops.c
Original file line number Diff line number Diff line change
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 46436cf

Please sign in to comment.