Skip to content

Commit

Permalink
core: tcp - keep connection id on event route cb structure
Browse files Browse the repository at this point in the history
(cherry picked from commit 11e7d71)
  • Loading branch information
miconda committed Apr 25, 2024
1 parent 28bbcd5 commit db2e96e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/core/tcp_conn.h
Expand Up @@ -422,6 +422,7 @@ typedef struct tcp_event_info
typedef struct tcp_closed_event_info
{
enum tcp_closed_reason reason;
int id;
struct tcp_connection *con;
} tcp_closed_event_info_t;

Expand Down
1 change: 1 addition & 0 deletions src/core/tcp_main.c
Expand Up @@ -3689,6 +3689,7 @@ static int tcp_emit_closed_event(struct tcp_connection *con)
if(likely(sr_event_enabled(SREV_TCP_CLOSED))) {
memset(&tev, 0, sizeof(tcp_closed_event_info_t));
tev.reason = reason;
tev.id = con->id;
tev.con = con;
evp.data = (void *)(&tev);
ret = sr_event_exec(SREV_TCP_CLOSED, &evp);
Expand Down

0 comments on commit db2e96e

Please sign in to comment.