diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-08-04 22:46:45 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-08-04 22:46:45 +0000 |
commit | babf43abf301d072192bda1f72a47440c354b072 (patch) | |
tree | d917d33ebb97d2b783e163f299b360be4f5b3a0a /src/libwpactrl/wpactrl_query.c | |
parent | 69099d84949a8044fdfc74e9d7ff6b9e57fc0bcd (diff) | |
download | bcnm-babf43abf301d072192bda1f72a47440c354b072.tar.xz |
Add the higher layer of libwpactrl
Diffstat (limited to 'src/libwpactrl/wpactrl_query.c')
-rw-r--r-- | src/libwpactrl/wpactrl_query.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libwpactrl/wpactrl_query.c b/src/libwpactrl/wpactrl_query.c index b03899f..b8b42df 100644 --- a/src/libwpactrl/wpactrl_query.c +++ b/src/libwpactrl/wpactrl_query.c @@ -1,13 +1,14 @@ /* ISC license. */ +#include <string.h> #include <skalibs/unix-timed.h> #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 *stamp) +ssize_t wpactrl_query (wpactrl_t *a, char const *q, char *ans, size_t ansmax, tain_t *stamp) { tain_t deadline ; tain_add(&deadline, stamp, &a->tto) ; - if (!ipc_timed_send(a->fds, q, qlen, &deadline, stamp)) return WPA_ERROR ; + if (!ipc_timed_send(a->fds, q, strlen(q), &deadline, stamp)) return WPA_ERROR ; return wpactrl_fd_timed_recv(a->fds, ans, ansmax, &deadline, stamp) ; } |