about summary refs log tree commit diff
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.c5
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) ;
 }