pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/34073 )


Change subject: stream_srv: Improve logging lines accepting new connections
......................................................................

stream_srv: Improve logging lines accepting new connections

Change-Id: Iaca9a99417d2f1dbf449e2b20e5dfcdd5e05b683
---
M src/stream_srv.c
M tests/stream/stream_test.err
2 files changed, 15 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/73/34073/1

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

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

--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34073
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Iaca9a99417d2f1dbf449e2b20e5dfcdd5e05b683
Gerrit-Change-Number: 34073
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to