Module: kamailio
Branch: 5.7
Commit: 5566647a85f23e753774fa4c87e213c2fbb7b317
URL:
https://github.com/kamailio/kamailio/commit/5566647a85f23e753774fa4c87e213c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T17:31:41+02:00
ctl: info log on ECONNRESET (connection reset by peer)
- not a type of error that can be controlled by kamailio
(cherry picked from commit 446c75e0e2194b6e42d768d2e3c79b5f0222905f)
(cherry picked from commit b5eb4f5ca037239f2ec1d99a16a71af0383f737e)
---
Modified: src/modules/ctl/io_listener.c
---
Diff:
https://github.com/kamailio/kamailio/commit/5566647a85f23e753774fa4c87e213c…
Patch:
https://github.com/kamailio/kamailio/commit/5566647a85f23e753774fa4c87e213c…
---
diff --git a/src/modules/ctl/io_listener.c b/src/modules/ctl/io_listener.c
index eb93f5f960d..4c15a6b1f21 100644
--- a/src/modules/ctl/io_listener.c
+++ b/src/modules/ctl/io_listener.c
@@ -486,7 +486,11 @@ static int handle_stream_read(struct stream_connection *s_c, int
idx)
} else if(errno == EINTR) {
goto again;
}
- LOG(L_ERR, "error reading: %s [%d]\n", strerror(errno), errno);
+ if(errno == ECONNRESET) {
+ LOG(L_INFO, "error reading: %s [%d]\n", strerror(errno), errno);
+ } else {
+ LOG(L_ERR, "error reading: %s [%d]\n", strerror(errno), errno);
+ }
goto error_read;
} else if(bytes_read == 0) { /* eof */
DBG("handle_stream read: eof on %s\n", s_c->parent->name);
@@ -602,7 +606,11 @@ static int handle_fifo_read(struct ctrl_socket *cs, int idx)
goto no_read; /* nothing has been read */
} else if(errno == EINTR)
goto again;
- LOG(L_ERR, "error reading: %s [%d]\n", strerror(errno), errno);
+ if(errno == ECONNRESET) {
+ LOG(L_INFO, "error reading: %s [%d]\n", strerror(errno), errno);
+ } else {
+ LOG(L_ERR, "error reading: %s [%d]\n", strerror(errno), errno);
+ }
goto error_read;
} else if(bytes_read == 0) { /* eof */
DBG("eof on %s\n", cs->name);