Browse code

core: tcp - debug messages merged, print bytes read and flags

(cherry picked from commit efb9c5f83b37c316b848ae7b6dc829e2f8ca6275)

Daniel-Constantin Mierla authored on 08/12/2020 11:50:56 • Henning Westerholt committed on 21/12/2020 15:26:36
Showing 1 changed files
... ...
@@ -316,12 +316,12 @@ again:
316 316
 			}
317 317
 		}else if (unlikely((bytes_read==0) ||
318 318
 					(*flags & RD_CONN_FORCE_EOF))){
319
+			LM_DBG("EOF on %p, FD %d, bytes %d, flags %x ([%s]:%u -> [%s]:%u)",
320
+					c, fd, bytes_read, *flags, ip_addr2a(&c->rcv.src_ip),
321
+					c->rcv.src_port, ip_addr2a(&c->rcv.dst_ip), c->rcv.dst_port);
319 322
 			c->state=S_CONN_EOF;
320 323
 			*flags|=RD_CONN_EOF;
321 324
 			tcp_emit_closed_event(c, TCP_CLOSED_EOF);
322
-			LM_DBG("EOF on %p, FD %d ([%s]:%u ->", c, fd,
323
-					ip_addr2a(&c->rcv.src_ip), c->rcv.src_port);
324
-			LM_DBG("-> [%s]:%u)\n", ip_addr2a(&c->rcv.dst_ip), c->rcv.dst_port);
325 325
 		}else{
326 326
 			if (unlikely(c->state==S_CONN_CONNECT || c->state==S_CONN_ACCEPT)){
327 327
 				TCP_STATS_ESTABLISHED(c->state);