summaryrefslogtreecommitdiff
path: root/src/libunixonacid
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-01-02 15:29:05 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-01-02 15:29:05 +0000
commit2e4d53d859e675a7f1f8fe41b27fd8b9f65b78a4 (patch)
tree26f90ca91f93a234dbd54bffba27b6e2d524e1c0 /src/libunixonacid
parent2dc97e2b5c06f8fafcefe413592de3251a57d923 (diff)
downloadskalibs-2e4d53d859e675a7f1f8fe41b27fd8b9f65b78a4.tar.xz
Really add it >.>
Diffstat (limited to 'src/libunixonacid')
-rw-r--r--src/libunixonacid/skaclient_syncify.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libunixonacid/skaclient_syncify.c b/src/libunixonacid/skaclient_syncify.c
new file mode 100644
index 0000000..08b7b9a
--- /dev/null
+++ b/src/libunixonacid/skaclient_syncify.c
@@ -0,0 +1,13 @@
+/* ISC license. */
+
+#include <errno.h>
+#include <skalibs/tai.h>
+#include <skalibs/skaclient.h>
+
+int skaclient_syncify (skaclient_t *a, tain_t const *deadline, tain_t *stamp)
+{
+ register 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 ;
+}