commit 2e4d53d859e675a7f1f8fe41b27fd8b9f65b78a4
parent 2dc97e2b5c06f8fafcefe413592de3251a57d923
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date: Fri, 2 Jan 2015 15:29:05 +0000
Really add it >.>
Diffstat:
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/libunixonacid/skaclient_syncify.c 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 ;
+}