summaryrefslogtreecommitdiff
path: root/src/libunixonacid/skaclient_default_cb.c
blob: 87fe62b07203efeb8f537b987e47a8e234a2521a (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 const *m, void *p)
{
  unsigned char *err = p ;
  if (m->len != 1 || m->nfds) return (errno = EPROTO, 0) ;
  *err = m->s[0] ;
  return 1 ;
}