summaryrefslogtreecommitdiff
path: root/src/libunixonacid/skaclient_syncify.c
blob: a0fd30f6a4c5ccb0c74395c2c020a6426c75156b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* ISC license. */

#include <errno.h>
#include <skalibs/skaclient.h>

int skaclient_syncify (skaclient_t *a, tain_t const *deadline, tain_t *stamp)
{
  int r ;
  if (!skaclient_timed_flush(a, deadline, stamp)) return 0 ;
  r = skaclient_timed_supdate(a, deadline, stamp) ;
  return r < 0 ? 0 : !r ? (errno = EPIPE, 0) : 1 ;
}