diff options
Diffstat (limited to 'src/libunixonacid/skaclient_server_init.c')
-rw-r--r-- | src/libunixonacid/skaclient_server_init.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libunixonacid/skaclient_server_init.c b/src/libunixonacid/skaclient_server_init.c index bd7c143..e44d0da 100644 --- a/src/libunixonacid/skaclient_server_init.c +++ b/src/libunixonacid/skaclient_server_init.c @@ -4,12 +4,10 @@ #include <skalibs/tai.h> #include <skalibs/unixmessage.h> -int skaclient_server_init (unixmessage_receiver_t *in, char *mainbuf, unsigned int mainlen, char *auxbuf, unsigned int auxlen, unixmessage_sender_t *out, unixmessage_sender_t *asyncout, char const *before, unsigned int beforelen, char const *after, unsigned int afterlen, tain_t const *deadline, tain_t *stamp) +int skaclient_server_init (unixmessage_receiver_t *in, unixmessage_sender_t *out, unixmessage_sender_t *asyncout, char const *before, unsigned int beforelen, char const *after, unsigned int afterlen, tain_t const *deadline, tain_t *stamp) { unixmessage_t m ; - if (!unixmessage_receiver_init(in, 0, mainbuf, mainlen, auxbuf, auxlen)) return 0 ; - unixmessage_sender_init(out, 1) ; - if (unixmessage_timed_receive(in, &m, deadline, stamp) < 0) return 0 ; - if (!skaclient_server_ack(&m, out, asyncout, before, beforelen, after, afterlen)) return 0 ; - return unixmessage_sender_timed_flush(out, deadline, stamp) ; + return (unixmessage_timed_receive(in, &m, deadline, stamp) >= 0) + && skaclient_server_ack(&m, out, asyncout, before, beforelen, after, afterlen) + && unixmessage_sender_timed_flush(out, deadline, stamp) ; } |