aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-08-04 14:00:23 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2023-08-07 19:16:24 +0200
commitb8fb69542b9913ade7e2e115872659d0f8dad191 (patch)
tree90396e9d00eef7d18cdb3569f74daf0b8810da46
parent7e68ac2c04fac4c32b3f5da71ed227654ceffe05 (diff)
stream_srv: Improve logging lines accepting new connections
-rw-r--r--src/stream_srv.c6
-rw-r--r--tests/stream/stream_test.err3
2 files changed, 6 insertions, 3 deletions
diff --git a/src/stream_srv.c b/src/stream_srv.c
index 6898ef4..4d8d4d3 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -129,13 +129,13 @@ static int osmo_stream_srv_link_ofd_cb(struct osmo_fd *ofd, unsigned int what)
switch (osa.u.sa.sa_family) {
case AF_UNIX:
- LOGSLNK(link, LOGL_DEBUG, "accept()ed new link on fd %d\n",
+ LOGSLNK(link, LOGL_INFO, "accept()ed new link on fd %d\n",
sock_fd);
_setsockopt_nosigpipe(link, sock_fd);
break;
case AF_INET6:
case AF_INET:
- LOGSLNK(link, LOGL_DEBUG, "accept()ed new link from %s\n",
+ LOGSLNK(link, LOGL_INFO, "accept()ed new link from %s\n",
osmo_sockaddr_to_str(&osa));
if (link->proto == IPPROTO_SCTP) {
@@ -146,7 +146,7 @@ static int osmo_stream_srv_link_ofd_cb(struct osmo_fd *ofd, unsigned int what)
}
break;
default:
- LOGSLNK(link, LOGL_DEBUG, "accept()ed unexpected address family %d\n",
+ LOGSLNK(link, LOGL_ERROR, "accept()ed unexpected address family %d\n",
osa.u.sa.sa_family);
goto error_close_socket;
}
diff --git a/tests/stream/stream_test.err b/tests/stream/stream_test.err
index 1fbf395..df0ebc3 100644
--- a/tests/stream/stream_test.err
+++ b/tests/stream/stream_test.err
@@ -1,3 +1,4 @@
+SRV(srv_link_test,127.0.0.11:1111) accept()ed new link from 127.0.0.1:8976
CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTING} connection established
{2.000001} autoreconnecting test step 11 [client NA, server OK], FD reg 1
@@ -19,12 +20,14 @@ CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){WAIT_RECONNECT} retrying
{11.000008} autoreconnecting test step 4 [client OK, server OK], FD reg 0
{11.000009} autoreconnecting test step 3 [client OK, server OK], FD reg 1
+SRV(srv_link_test,127.0.0.11:1111) accept()ed new link from 127.0.0.1:8976
CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTING} connection established
{11.000010} autoreconnecting test step 2 [client OK, server OK], FD reg 0
SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) connection closed with client
{11.000011} autoreconnecting test step 1 [client OK, server NA], FD reg 0
+SRV(srv_link_test,127.0.0.11:1111) accept()ed new link from 127.0.0.1:8976
CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTING} connection established
{11.000012} non-reconnecting test step 7 [client NA, server OK], FD reg 1