aboutsummaryrefslogtreecommitdiff
path: root/src/util_ct.h
diff options
context:
space:
mode:
authorDavid Timber <mieabby@gmail.com>2021-07-19 16:56:53 +1000
committerDavid Timber <mieabby@gmail.com>2021-07-19 16:56:53 +1000
commit74b8ff26438732b0ffbe20e128e99ecd92f8137a (patch)
tree42cc21c5f623bd7c9677d44f6bea0e4af3887d4c /src/util_ct.h
parenta9dfe7f6055de66742f389d13adbb71101f9c8c0 (diff)
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
Diffstat (limited to 'src/util_ct.h')
-rw-r--r--src/util_ct.h3
1 files changed, 3 insertions, 0 deletions
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 <errno.h> if you get compilation errors
+#define prne_is_nberr(expr) ((expr) == EAGAIN || (expr) == EWOULDBLOCK)