dect
/
libnl
Archived
13
0
Fork 0

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.
This commit is contained in:
Thomas Graf 2010-11-18 14:16:33 +01:00
parent 8a365dbd49
commit 5a08c8ff4c
1 changed files with 2 additions and 2 deletions

View File

@ -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)