Module: kamailio
Branch: master
Commit: 41040a0420ee48f51901bf32e29526c8948ecea0
URL:
https://github.com/kamailio/kamailio/commit/41040a0420ee48f51901bf32e29526c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-12-08T13:07:44+01:00
core: tcp - log connection state and flags on debug message
---
Modified: src/core/tcp_read.c
---
Diff:
https://github.com/kamailio/kamailio/commit/41040a0420ee48f51901bf32e29526c…
Patch:
https://github.com/kamailio/kamailio/commit/41040a0420ee48f51901bf32e29526c…
---
diff --git a/src/core/tcp_read.c b/src/core/tcp_read.c
index 13a21f6ddd..50853cc5b6 100644
--- a/src/core/tcp_read.c
+++ b/src/core/tcp_read.c
@@ -296,9 +296,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);