laforge has submitted this change. (
https://gerrit.osmocom.org/c/libosmo-netif/+/29178 )
Change subject: Properly handle send() return code
......................................................................
Properly handle send() return code
Change-Id: If9b80e855b740254d5414ea50b4ce594855da8e9
---
M src/stream.c
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/stream.c b/src/stream.c
index dc44a1c..a7053e9 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -1330,8 +1330,8 @@
default:
ret = -ENOTSUP;
}
- if (ret < 0) {
- LOGP(DLINP, LOGL_ERROR, "error to send: %s\n", strerror(-ret));
+ if (ret < 0) { /* send(): On error , -1 is returned, and errno is set
appropriately */
+ LOGP(DLINP, LOGL_ERROR, "error to send: %s\n", (ret == -1) ?
strerror(errno) : strerror(-ret));
}
msgb_free(msg);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/29178
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: If9b80e855b740254d5414ea50b4ce594855da8e9
Gerrit-Change-Number: 29178
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-MessageType: merged