Module: kamailio Branch: master Commit: e58dc89324b30f09853a7430620e632ec5efaad5 URL: https://github.com/kamailio/kamailio/commit/e58dc89324b30f09853a7430620e632ec5efaad5
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2024-11-25T10:27:11+01:00 core: tcp read - convert ips to different buffers for log messages --- Modified: src/core/tcp_read.c --- Diff: https://github.com/kamailio/kamailio/commit/e58dc89324b30f09853a7430620e632ec5efaad5.diff Patch: https://github.com/kamailio/kamailio/commit/e58dc89324b30f09853a7430620e632ec5efaad5.patch --- diff --git a/src/core/tcp_read.c b/src/core/tcp_read.c index fd60918fe34..cd7790eb958 100644 --- a/src/core/tcp_read.c +++ b/src/core/tcp_read.c @@ -265,10 +265,10 @@ int tcp_read_data(int fd, struct tcp_connection *c, char *buf, int b_size, } } LOG(cfg_get(core, core_cfg, corelog), - "error reading: %s (%d) ([%s]:%u ->", strerror(errno), - errno, ip_addr2a(&c->rcv.src_ip), c->rcv.src_port); - LOG(cfg_get(core, core_cfg, corelog), "-> [%s]:%u)\n", - ip_addr2a(&c->rcv.dst_ip), c->rcv.dst_port); + "error reading: %s (%d) ([%s]:%u -> [%s]:%u)\n", + strerror(errno), errno, ip_addr2xa(&c->rcv.src_ip), + c->rcv.src_port, ip_addr2xa(&c->rcv.dst_ip), + c->rcv.dst_port); if(errno == ETIMEDOUT) { c->event = TCP_CLOSED_TIMEOUT; } else if(errno == ECONNRESET) { @@ -280,8 +280,8 @@ int tcp_read_data(int fd, struct tcp_connection *c, char *buf, int b_size, 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); + ip_addr2xa(&c->rcv.src_ip), c->rcv.src_port, + ip_addr2xa(&c->rcv.dst_ip), c->rcv.dst_port); c->state = S_CONN_EOF; *flags |= RD_CONN_EOF; c->event = TCP_CLOSED_EOF; _______________________________________________ Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org To unsubscribe send an email to sr-dev-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!