summaryrefslogtreecommitdiff
path: root/src/libskabus/skabus_rpc_cancel.c
blob: ad8bf6a7cf791fb61249c55b3f88ebc1216f44d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* ISC license. */

#include <errno.h>

#include <skalibs/tai.h>
#include <skalibs/skaclient.h>

#include <skabus/rpc.h>

int skabus_rpc_cancel (skabus_rpc_t *a, uint64_t serial, tain const *deadline, tain *stamp)
{
  unsigned char r ;
  if (!skabus_rpc_cancel_async(a, serial, &r)) return 0 ;
  if (!skaclient_syncify(&a->connection, deadline, stamp)) return 0 ;
  if (r) return (errno = r, 0) ;
  return 1 ;
}