diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-11-24 18:54:03 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-11-24 18:54:03 +0000 |
commit | 6432cead1941d5305bc2d7f22821ca8a98f43f78 (patch) | |
tree | 1898075255d0e9ac285a22326356c564c1b6c839 /src/libskabus/skabus_rpc_sendq.c | |
parent | 2c5c19923ec56298c4e6b4a71084b27414fd96d6 (diff) | |
download | skabus-6432cead1941d5305bc2d7f22821ca8a98f43f78.tar.xz |
Add skabus-rpc-daemon, skabus-rpcd and the skabus_rpc library
Diffstat (limited to 'src/libskabus/skabus_rpc_sendq.c')
-rw-r--r-- | src/libskabus/skabus_rpc_sendq.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libskabus/skabus_rpc_sendq.c b/src/libskabus/skabus_rpc_sendq.c new file mode 100644 index 0000000..06944fa --- /dev/null +++ b/src/libskabus/skabus_rpc_sendq.c @@ -0,0 +1,14 @@ +/* ISC license. */ + +#include <errno.h> +#include <skalibs/skaclient.h> +#include <skabus/rpc.h> +#include "skabus-rpc-internal.h" + +uint64_t skabus_rpc_sendq_withfds (skabus_rpc_t *a, char const *prefix, size_t plen, char const *ifname, char const *s, size_t len, int const *fds, unsigned int nfds, unsigned char const *bits, tain_t const *limit, tain_t const *deadline, tain_t *stamp) +{ + skabus_rpc_send_result_t r ; + if (!skabus_rpc_sendq_withfds_async(a, prefix, plen, ifname, s, len, fds, nfds, bits, limit, &r)) return 0 ; + if (!skaclient_syncify(&a->connection, deadline, stamp)) return 0 ; + return r.err ? (errno = r.err, 0) : r.u ; +} |