blob: 6e641e244bd7b59e959dd92a7be3e90c6b327871 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/* ISC license. */
#include <errno.h>
#include <skalibs/bytestr.h>
#include <skalibs/error.h>
#include <skalibs/skaclient.h>
#include <skalibs/unixmessage.h>
#include "skaclient-internal.h"
int skaclient_start_cb (unixmessage_t const *m, skaclient_cbdata_t *blah)
{
if (m->len != blah->afterlen
|| byte_diff(m->s, m->len, blah->after)
|| m->nfds != 1) return (errno = EPROTO, 0) ;
blah->asyncin->mainb.fd = m->fds[0] ;
blah->asyncout->fd = m->fds[0] ;
return 1 ;
}
|