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

#include <errno.h>

#include <skalibs/skaclient.h>

int skaclient_syncify (skaclient *a, tain const *deadline, tain *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 ;
}