summaryrefslogtreecommitdiff
path: root/src/libwpactrl/wpactrl_query.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libwpactrl/wpactrl_query.c')
-rw-r--r--src/libwpactrl/wpactrl_query.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libwpactrl/wpactrl_query.c b/src/libwpactrl/wpactrl_query.c
index 951c536..b03899f 100644
--- a/src/libwpactrl/wpactrl_query.c
+++ b/src/libwpactrl/wpactrl_query.c
@@ -4,8 +4,10 @@
#include <bcnm/wpactrl.h>
#include "wpactrl-internal.h"
-ssize_t wpactrl_query (wpactrl_t *a, char const *q, size_t qlen, char *ans, size_t ansmax, tain_t const *deadline, tain_t *stamp)
+ssize_t wpactrl_query (wpactrl_t *a, char const *q, size_t qlen, char *ans, size_t ansmax, tain_t *stamp)
{
- if (!ipc_timed_send(a->fds, q, qlen, deadline, stamp)) return WPA_ERROR ;
- return wpactrl_fd_timed_recv(a->fds, ans, ansmax, deadline, stamp) ;
+ tain_t deadline ;
+ tain_add(&deadline, stamp, &a->tto) ;
+ if (!ipc_timed_send(a->fds, q, qlen, &deadline, stamp)) return WPA_ERROR ;
+ return wpactrl_fd_timed_recv(a->fds, ans, ansmax, &deadline, stamp) ;
}