diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-11-25 14:15:08 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-11-25 14:15:08 +0000 |
commit | 7ae80340d621d6add95f6c7d9e5e7a0e921f0b42 (patch) | |
tree | fdf6c4edee23a85248dc448c347d7056a0bebfff /src/libskabus/skabus_rpc_replyv.c | |
parent | 38c9492b4fb971fe08e4ac0167e06e5dccb3eb2e (diff) | |
download | skabus-7ae80340d621d6add95f6c7d9e5e7a0e921f0b42.tar.xz |
Finish skabus_rpc doc, add missing functions
Diffstat (limited to 'src/libskabus/skabus_rpc_replyv.c')
-rw-r--r-- | src/libskabus/skabus_rpc_replyv.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/libskabus/skabus_rpc_replyv.c b/src/libskabus/skabus_rpc_replyv.c index ef727e9..c972ce4 100644 --- a/src/libskabus/skabus_rpc_replyv.c +++ b/src/libskabus/skabus_rpc_replyv.c @@ -1,19 +1,10 @@ /* ISC license. */ -#include <sys/uio.h> -#include <skalibs/uint64.h> -#include <skalibs/unixmessage.h> #include <skalibs/skaclient.h> #include <skabus/rpc.h> -int skabus_rpc_replyv_withfds (skabus_rpc_t *a, uint64_t serial, char result, struct iovec const *v, unsigned int vlen, int const *fds, unsigned int nfds, unsigned char const *bits) +int skabus_rpc_replyv_withfds (skabus_rpc_t *a, uint64_t serial, char result, struct iovec const *v, unsigned int vlen, int const *fds, unsigned int nfds, unsigned char const *bits, tain_t const *deadline, tain_t *stamp) { - char pack[10] = "R" ; - struct iovec vv[vlen + 1] ; - unixmessage_v_t m = { .v = vv, .vlen = vlen+1, .fds = (int *)fds, .nfds = nfds } ; - vv[0].iov_base = pack ; vv[0].iov_len = 10 ; - for (unsigned int i = 0 ; i < vlen ; i++) vv[1+i] = v[i] ; - uint64_pack_big(pack+1, serial) ; - pack[9] = result ; - return skaclient_aputv_and_close(&a->connection, &m, bits) ; + return skabus_rpc_replyv_withfds_async(a, serial, result, v, vlen, fds, nfds, bits) + && skaclient_timed_aflush(&a->connection, deadline, stamp) ; } |