Skip to content

Commit

Permalink
core: tcp - log connection state and flags on debug message
Browse files Browse the repository at this point in the history
(cherry picked from commit 41040a0)
  • Loading branch information
miconda committed Dec 11, 2020
1 parent bec3650 commit 834bca2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/core/tcp_read.c
Expand Up @@ -316,9 +316,11 @@ int tcp_read_data(int fd, struct tcp_connection *c,
}
}else if (unlikely((bytes_read==0) ||
(*flags & RD_CONN_FORCE_EOF))){
LM_DBG("EOF on %p, FD %d, bytes %d, flags %x ([%s]:%u -> [%s]:%u)",
c, fd, bytes_read, *flags, ip_addr2a(&c->rcv.src_ip),
c->rcv.src_port, ip_addr2a(&c->rcv.dst_ip), c->rcv.dst_port);
LM_DBG("EOF on connection %p (state: %u, flags: %x) - FD %d,"
" bytes %d, rd-flags %x ([%s]:%u -> [%s]:%u)",
c, c->state, c->flags, fd, bytes_read, *flags,
ip_addr2a(&c->rcv.src_ip), c->rcv.src_port,
ip_addr2a(&c->rcv.dst_ip), c->rcv.dst_port);
c->state=S_CONN_EOF;
*flags|=RD_CONN_EOF;
tcp_emit_closed_event(c, TCP_CLOSED_EOF);
Expand Down

0 comments on commit 834bca2

Please sign in to comment.