diff options
Diffstat (limited to 'src/libunixonacid')
-rw-r--r-- | src/libunixonacid/skaclient_send.c | 2 | ||||
-rw-r--r-- | src/libunixonacid/skaclient_sendmsg.c | 10 | ||||
-rw-r--r-- | src/libunixonacid/skaclient_sendmsgv.c | 10 |
3 files changed, 7 insertions, 15 deletions
diff --git a/src/libunixonacid/skaclient_send.c b/src/libunixonacid/skaclient_send.c index 8bd31ab..38dcddb 100644 --- a/src/libunixonacid/skaclient_send.c +++ b/src/libunixonacid/skaclient_send.c @@ -1,8 +1,8 @@ /* ISC license. */ -#include <skalibs/skaclient.h> #include <skalibs/tai.h> #include <skalibs/unixmessage.h> +#include <skalibs/skaclient.h> int skaclient_send (skaclient_t *a, char const *s, unsigned int len, unixmessage_handler_func_t *cb, void *result, tain_t const *deadline, tain_t *stamp) { diff --git a/src/libunixonacid/skaclient_sendmsg.c b/src/libunixonacid/skaclient_sendmsg.c index 3f88ec7..49cfbea 100644 --- a/src/libunixonacid/skaclient_sendmsg.c +++ b/src/libunixonacid/skaclient_sendmsg.c @@ -1,15 +1,11 @@ /* ISC license. */ -#include <errno.h> -#include <skalibs/skaclient.h> #include <skalibs/tai.h> #include <skalibs/unixmessage.h> +#include <skalibs/skaclient.h> int skaclient_sendmsg_and_close (skaclient_t *a, unixmessage_t const *m, unsigned char const *bits, unixmessage_handler_func_t *cb, void *result, tain_t const *deadline, tain_t *stamp) { - register int r ; - if (!skaclient_putmsg_and_close(a, m, bits, cb, result)) return 0 ; - 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 ; + return skaclient_putmsg_and_close(a, m, bits, cb, result) + && skaclient_syncify(a, deadline, stamp) ; } diff --git a/src/libunixonacid/skaclient_sendmsgv.c b/src/libunixonacid/skaclient_sendmsgv.c index ac4bcdb..6584173 100644 --- a/src/libunixonacid/skaclient_sendmsgv.c +++ b/src/libunixonacid/skaclient_sendmsgv.c @@ -1,15 +1,11 @@ /* ISC license. */ -#include <errno.h> -#include <skalibs/skaclient.h> #include <skalibs/tai.h> #include <skalibs/unixmessage.h> +#include <skalibs/skaclient.h> int skaclient_sendmsgv_and_close (skaclient_t *a, unixmessage_v_t const *m, unsigned char const *bits, unixmessage_handler_func_t *cb, void *result, tain_t const *deadline, tain_t *stamp) { - register int r ; - if (!skaclient_putmsgv_and_close(a, m, bits, cb, result)) return 0 ; - 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 ; + return skaclient_putmsgv_and_close(a, m, bits, cb, result) + && skaclient_syncify(a, deadline, stamp) ; } |