pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/38891?usp=email ) Change subject: stream: Improve logging around recv() failure ...................................................................... stream: Improve logging around recv() failure Change-Id: Ic050e7141b029d984fbbcc76ffc175f8e6b01664 --- M src/stream_cli.c M src/stream_srv.c 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/91/38891/1 diff --git a/src/stream_cli.c b/src/stream_cli.c index b0dac09..757de1c 100644 --- a/src/stream_cli.c +++ b/src/stream_cli.c @@ -1162,7 +1162,9 @@ if (ret == -EAGAIN) /* Received MSG_NOTIFICATION from stream_sctp_recvmsg_wrapper() */ return ret; if (errno == EPIPE || errno == ECONNRESET) - LOGSCLI(cli, LOGL_ERROR, "lost connection with srv\n"); + LOGSCLI(cli, LOGL_ERROR, "lost connection with srv (%d)\n", errno); + else + LOGSCLI(cli, LOGL_ERROR, "recv failed (%d)\n", errno); osmo_stream_cli_reconnect(cli); return ret; } else if (ret == 0) { diff --git a/src/stream_srv.c b/src/stream_srv.c index 9b39bdc..a600ad9 100644 --- a/src/stream_srv.c +++ b/src/stream_srv.c @@ -1184,7 +1184,9 @@ if (ret == -EAGAIN) /* Received MSG_NOTIFICATION from stream_sctp_recvmsg_wrapper() */ return ret; if (errno == EPIPE || errno == ECONNRESET) - LOGSSRV(conn, LOGL_ERROR, "lost connection with client\n"); + LOGSSRV(conn, LOGL_ERROR, "lost connection with client (%d)\n", errno); + else + LOGSSRV(conn, LOGL_ERROR, "recv failed (%d)\n", errno); return ret; } else if (ret == 0) { LOGSSRV(conn, LOGL_ERROR, "connection closed with client\n"); -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/38891?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Ic050e7141b029d984fbbcc76ffc175f8e6b01664 Gerrit-Change-Number: 38891 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de>