summaryrefslogtreecommitdiff
path: root/src/libunixonacid/skaclient_default_cb.c
blob: 447d796d8e38676db47bffcdc945d95f4c09584e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* ISC license. */

#include <errno.h>

#include <skalibs/skaclient.h>
#include <skalibs/unixmessage.h>
#include <skalibs/posixishard.h>

int skaclient_default_cb (unixmessage_t const *m, void *p)
{
  unsigned char *err = p ;
  if (m->len != 1 || m->nfds) return (errno = EPROTO, 0) ;
  *err = m->s[0] ;
  return 1 ;
}