laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/36040?usp=email )
Change subject: input/ipa: Log error message also in unexpeted error paths ......................................................................
input/ipa: Log error message also in unexpeted error paths
When calling ipa_msg_recv_buffered() we already had log statements for -EPIPE, -ECONNRESET and zero-lengthe read (EOF), but not yet for any other error causes. Let's add a related 'else' clause.
Change-Id: Ib2134817f44026adf0111051ed9ec3c6b8fbe7c9 Related: SYS#6801 --- M src/input/ipa.c 1 file changed, 18 insertions(+), 0 deletions(-)
Approvals: osmith: Looks good to me, approved Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve
diff --git a/src/input/ipa.c b/src/input/ipa.c index 2235b39..5b064e0 100644 --- a/src/input/ipa.c +++ b/src/input/ipa.c @@ -66,6 +66,8 @@ LOGIPA(link, LOGL_ERROR, "lost connection with server\n"); else if (ret == 0) LOGIPA(link, LOGL_ERROR, "connection closed with server\n"); + else + LOGIPA(link, LOGL_ERROR, "unknown error %d from socket\n", ret); ipa_client_conn_close(link); if (link->updown_cb) link->updown_cb(link, 0); @@ -410,6 +412,8 @@ LOGIPA(conn, LOGL_ERROR, "lost connection with server\n"); else if (ret == 0) LOGIPA(conn, LOGL_ERROR, "connection closed with server\n"); + else + LOGIPA(conn, LOGL_ERROR, "unknown error %d from socket\n", ret); ipa_server_conn_destroy(conn); return -EBADF; }