blob: 23b3ff2e7d7630da1508eff99935bc7deb1e1d2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/* ISC license. */
#include <errno.h>
#include <skalibs/stralloc.h>
#include <bcnm/wpactrl.h>
#include "wpactrl-internal.h"
int wpactrl_querysa (wpactrl_t *a, char const *s, stralloc *sa, tain *stamp)
{
char buf[WPACTRL_PACKET_MAX] ;
ssize_t r = wpactrl_query(a, s, buf, WPACTRL_PACKET_MAX, stamp) ;
if (r < 0) return 0 ;
if (!r) return (errno = EPIPE, 0) ;
return stralloc_catb(sa, buf, r) ;
}
|