summaryrefslogtreecommitdiff
path: root/src/libwpactrl/wpactrl_xchg_timeout.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libwpactrl/wpactrl_xchg_timeout.c')
-rw-r--r--src/libwpactrl/wpactrl_xchg_timeout.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libwpactrl/wpactrl_xchg_timeout.c b/src/libwpactrl/wpactrl_xchg_timeout.c
new file mode 100644
index 0000000..01907ea
--- /dev/null
+++ b/src/libwpactrl/wpactrl_xchg_timeout.c
@@ -0,0 +1,15 @@
+/* ISC license. */
+
+#include <errno.h>
+#include <skalibs/tai.h>
+#include <bcnm/wpactrl.h>
+
+int wpactrl_xchg_timeout (wpactrl_xchg_t *dt, tain_t const *stamp)
+{
+ if (!tain_less(stamp, &dt->deadline))
+ {
+ dt->status = ETIMEDOUT ;
+ return 1 ;
+ }
+ else return 0 ;
+}