pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/42191?usp=email )
Change subject: stream_cli: Log errno string if write failed ......................................................................
stream_cli: Log errno string if write failed
Change-Id: I68468f0452cbc86b6210bbd1dbfa251579270adb --- M src/stream_cli.c 1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/91/42191/1
diff --git a/src/stream_cli.c b/src/stream_cli.c index e59122b..1c1d3df 100644 --- a/src/stream_cli.c +++ b/src/stream_cli.c @@ -605,7 +605,9 @@ break; case STREAM_CLI_STATE_CONNECTED: if (msg && res <= 0) { - LOGSCLI(cli, LOGL_ERROR, "received error %d in response to send\n", res); + char errbuf[64]; + strerror_r(errno, errbuf, sizeof(errbuf)); + LOGSCLI(cli, LOGL_ERROR, "received error %d (%s) in response to send\n", errno, errbuf); (void)stream_cli_reconnect(cli); } /* res=0 && msgb=NULL: "connected notify", but we already received before a read_cb