summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Graf <tgr@plip.localdomain>2008-10-20 13:12:13 +0200
committerThomas Graf <tgr@plip.localdomain>2008-10-20 13:12:13 +0200
commitcfcfca070355b246028df60da79813f09ed65755 (patch)
treef61521813cc56aef4cfc0c6464cca9aa11b2fb2f /include
parent2bdee95a765457fe4206b89d51974ae56e75c588 (diff)
downloadandroid_external_libnl-cfcfca070355b246028df60da79813f09ed65755.tar.gz
android_external_libnl-cfcfca070355b246028df60da79813f09ed65755.tar.bz2
android_external_libnl-cfcfca070355b246028df60da79813f09ed65755.zip
Add internal wait_for_ack() which only waits for ACK if !NL_NO_AUTO_ACK
This changeset ensures that internal code properly synchronizes to ACKs if ACKs are enabled and otherwise return immediately.
Diffstat (limited to 'include')
-rw-r--r--include/netlink-local.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/netlink-local.h b/include/netlink-local.h
index 958ac23..1fafb51 100644
--- a/include/netlink-local.h
+++ b/include/netlink-local.h
@@ -172,4 +172,12 @@ static inline char *nl_cache_name(struct nl_cache *cache)
END_OF_MSGTYPES_LIST, \
}
+static inline int wait_for_ack(struct nl_sock *sk)
+{
+ if (sk->s_flags & NL_NO_AUTO_ACK)
+ return 0;
+ else
+ return nl_wait_for_ack(sk);
+}
+
#endif