diff options
author | Thomas Graf <tgraf@suug.ch> | 2010-11-18 13:16:33 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2010-11-18 13:16:33 (GMT) |
commit | 5a08c8ff4cf9573f307ef2843d2a44f1f0a14980 (patch) | |
tree | b9e2c0b222c0b01bc56877522779098368b1cf1a /lib | |
parent | 8a365dbd49f558a61ae2f2de16b62afaa4bc2b79 (diff) | |
download | libnl-5a08c8ff4cf9573f307ef2843d2a44f1f0a14980.zip libnl-5a08c8ff4cf9573f307ef2843d2a44f1f0a14980.tar.gz libnl-5a08c8ff4cf9573f307ef2843d2a44f1f0a14980.tar.bz2 |
Inherit return code of NL_CB_MSG_OUT in nl_sendmsg()
If NL_CB_MSG_OUT() returns anything != NL_OK, return that value
to let any caller of nl_sendmsg() know that the message has not
been sent.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/nl.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -211,8 +211,8 @@ int nl_sendmsg(struct nl_sock *sk, struct nl_msg *msg, struct msghdr *hdr) cb = sk->s_cb; if (cb->cb_set[NL_CB_MSG_OUT]) - if (nl_cb_call(cb, NL_CB_MSG_OUT, msg) != NL_OK) - return 0; + if ((ret = nl_cb_call(cb, NL_CB_MSG_OUT, msg)) != NL_OK) + return ret; ret = sendmsg(sk->s_fd, hdr, 0); if (ret < 0) |