From: Tysen Moore <[email protected]>
---
This removes some misleading logging of the sendto return code and
refers to this as "err" in the log--which it often is not. Later
in the code it checks for true errors (err<0) and even truncated
transmissions. Therefore the original log is useless and misleading.
src/inet.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/inet.c b/src/inet.c
index 90ec5f7..ddd85fd 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -2380,9 +2380,10 @@ int __connman_inet_rtnl_talk(struct
__connman_inet_rtnl_handle *rtnl,
err = sendto(rtnl->fd, &rtnl->req.n, rtnl->req.n.nlmsg_len, 0,
(struct sockaddr *) &nladdr, sizeof(nladdr));
- DBG("handle %p len %d err %d", rtnl, rtnl->req.n.nlmsg_len, err);
+ DBG("handle %p len %d", rtnl, rtnl->req.n.nlmsg_len);
if (err < 0) {
- connman_error("Can not talk to rtnetlink");
+ connman_error("Can not talk to rtnetlink (err %d: %s)",
+ errno, strerror(errno));
return -errno;
}
--
1.7.9.5
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman