diff options
author | David Timber <mieabby@gmail.com> | 2021-07-25 18:40:16 +1000 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2021-07-25 18:40:16 +1000 |
commit | a72b876cf8f7c01ab2d3808a168ef16620498298 (patch) | |
tree | 43b259cf3a20636f52aebd2d777f89cf95d66673 /src/iobuf.c | |
parent | d875ed3b36f2a3fb5d6ceb3c37f6749603e4d0d3 (diff) |
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
*
Diffstat (limited to 'src/iobuf.c')
-rw-r--r-- | src/iobuf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/iobuf.c b/src/iobuf.c index a78e965..6e37a26 100644 --- a/src/iobuf.c +++ b/src/iobuf.c @@ -44,6 +44,15 @@ bool prne_alloc_iobuf (prne_iobuf_t *ib, const size_t ny_size) { return true; } +bool prne_try_alloc_iobuf (prne_iobuf_t *ib, const size_t *ny_size) { + for (; *ny_size != 0; ny_size += 1) { + if (prne_alloc_iobuf(ib, *ny_size)) { + return true; + } + } + return false; +} + void prne_iobuf_setextbuf ( prne_iobuf_t *ib, uint8_t *m, |