Module: kamailio
Branch: master
Commit: efb9c5f83b37c316b848ae7b6dc829e2f8ca6275
URL:
https://github.com/kamailio/kamailio/commit/efb9c5f83b37c316b848ae7b6dc829e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-12-08T12:50:56+01:00
core: tcp - debug messages merged, print bytes read and flags
---
Modified: src/core/tcp_read.c
---
Diff:
https://github.com/kamailio/kamailio/commit/efb9c5f83b37c316b848ae7b6dc829e…
Patch:
https://github.com/kamailio/kamailio/commit/efb9c5f83b37c316b848ae7b6dc829e…
---
diff --git a/src/core/tcp_read.c b/src/core/tcp_read.c
index 3ae21a71d9..13a21f6ddd 100644
--- a/src/core/tcp_read.c
+++ b/src/core/tcp_read.c
@@ -296,12 +296,12 @@ 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);
c->state=S_CONN_EOF;
*flags|=RD_CONN_EOF;
tcp_emit_closed_event(c, TCP_CLOSED_EOF);
- LM_DBG("EOF on %p, FD %d ([%s]:%u ->", c, fd,
- ip_addr2a(&c->rcv.src_ip), c->rcv.src_port);
- LM_DBG("-> [%s]:%u)\n", ip_addr2a(&c->rcv.dst_ip),
c->rcv.dst_port);
}else{
if (unlikely(c->state==S_CONN_CONNECT || c->state==S_CONN_ACCEPT)){
TCP_STATS_ESTABLISHED(c->state);