From 74b8ff26438732b0ffbe20e128e99ecd92f8137a Mon Sep 17 00:00:00 2001 From: David Timber Date: Mon, 19 Jul 2021 16:56:53 +1000 Subject: Fix htbt hang, fix proone-hostinfo crash bug ... * Fix htbt hang bug - stagnant data in ssl ctx buffer not flushed * Add pending_f() abstraction for mbedtls_ssl_check_pending() * Call read_f() when pending_f() returns true * Add macro functions: prne_is_nberr() and prne_mbedtls_is_nberr() * read_f() and write_f() will always set errno to EAGAIN in the event of MBEDTLS_ERR_SSL_WANT_READ and MBEDTLS_ERR_SSL_WANT_WRITE * proone-hostinfo: fix crash bug when program init is not successful * launch.json: Ignore SIGPIPE to hostinfod --- src/util_ct.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/util_ct.h') diff --git a/src/util_ct.h b/src/util_ct.h index bc3492b..7fdf842 100644 --- a/src/util_ct.h +++ b/src/util_ct.h @@ -56,3 +56,6 @@ if ((l) != NULL) {\ *(l) = (r);\ } + +// include if you get compilation errors +#define prne_is_nberr(expr) ((expr) == EAGAIN || (expr) == EWOULDBLOCK) -- cgit