From a72b876cf8f7c01ab2d3808a168ef16620498298 Mon Sep 17 00:00:00 2001 From: David Timber Date: Sun, 25 Jul 2021 18:40:16 +1000 Subject: Impl htbt M2M binary update and bug fixes ... * Change signature of tmpfile() cb * Add PRNE_DATA_KEY_VER_MAT * Add prne_try_alloc_iobuf() * Fix htbt: don't run cncp when both resolv and cnc_txtrec are not passed * Impl upbin cb on proone-bne * Fix proone-htbtclient: content of status frame was discarded * htbt is now responsible for setting FD_CLOEXEC on temp files * Changes in mttools for valgrind run * Add proone-test_iobuf * Fix event leak in resolv * src/test-resolv.sh: run proone-resolv on valgrind * Add prne_cmp_uuid_asc() and prne_cmp_uuid_desc() for version matrix * --- src/htbt.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/htbt.h') diff --git a/src/htbt.h b/src/htbt.h index 45debf0..d528c89 100644 --- a/src/htbt.h +++ b/src/htbt.h @@ -13,20 +13,23 @@ typedef struct prne_htbt_param prne_htbt_param_t; typedef struct prne_htbt_cbset prne_htbt_cbset_t; typedef bool(*prne_htbt_cnc_txtrec_ft)(void *ctx, char *out); typedef bool(*prne_htbt_hostinfo_ft)(void *ctx, prne_htbt_host_info_t *out); -typedef char*(*prne_htbt_tmpfile_ft)( +typedef int(*prne_htbt_tmpfile_ft)( void *ctx, + const int flags, + const mode_t mode, size_t req_size, - const mode_t mode); + char **path); typedef bool(*prne_htbt_bin_ft)( void *ctx, const char *path, const prne_htbt_cmd_t *cmd); struct prne_htbt_cbset { + // All callback functions are optional. prne_htbt_cnc_txtrec_ft cnc_txtrec; - prne_htbt_hostinfo_ft hostinfo; // optional - prne_htbt_tmpfile_ft tmpfile; // optional - prne_htbt_bin_ft upbin; // optional + prne_htbt_hostinfo_ft hostinfo; + prne_htbt_tmpfile_ft tmpfile; + prne_htbt_bin_ft upbin; }; struct prne_htbt_param { -- cgit