summaryrefslogtreecommitdiff
path: root/src/libunixonacid/skaclient_default_cb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libunixonacid/skaclient_default_cb.c')
-rw-r--r--src/libunixonacid/skaclient_default_cb.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libunixonacid/skaclient_default_cb.c b/src/libunixonacid/skaclient_default_cb.c
new file mode 100644
index 0000000..10934e5
--- /dev/null
+++ b/src/libunixonacid/skaclient_default_cb.c
@@ -0,0 +1,14 @@
+/* ISC license. */
+
+#include <errno.h>
+#include <skalibs/error.h>
+#include <skalibs/skaclient.h>
+#include <skalibs/unixmessage.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 ;
+}