stream_srv: Improve logging lines accepting new connections

Change-Id: Iaca9a99417d2f1dbf449e2b20e5dfcdd5e05b683
This commit is contained in:
Pau Espin 2023-08-04 14:00:23 +02:00
parent 7e68ac2c04
commit b8fb69542b
2 changed files with 6 additions and 3 deletions

View File

@ -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;
}

View File

@ -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