From 23fba266a9454ee6ca095b7f6eccf523f6526607 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 2 Mar 2019 09:41:24 +0000 Subject: Save pending changes in 1.0.0.0 branch --- src/state/hpr_shutdown.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/state/hpr_shutdown.c (limited to 'src/state/hpr_shutdown.c') diff --git a/src/state/hpr_shutdown.c b/src/state/hpr_shutdown.c new file mode 100644 index 0000000..9c9ff51 --- /dev/null +++ b/src/state/hpr_shutdown.c @@ -0,0 +1,16 @@ +/* ISC license. */ + +#include + +#include +#include + +#include "hpr.h" + +int hpr_shutdown (unsigned int what, tain_t const *when, unsigned int grace) +{ + char pack[5 + TAIN_PACK] = { " hpr"[what] } ; + tain_pack(pack+1, when) ; + uint32_pack_big(pack + 1 + TAIN_PACK, (uint32_t)grace) ; + return hpr_send(pack, 5 + TAIN_PACK) ; +} -- cgit v1.2.3