@xkaraman commented on this pull request.


> +#include <openssl/ssl.h>
+#include <openssl/err.h>
+
+#include "../../core/dprint.h"
+#include "utils.h"
+
+/*
+ * Get any leftover errors from OpenSSL and print them.
+ * ERR_get_error() also removes the error from the OpenSSL error stack.
+ * This is useful to call before any SSL_* IO calls to make sure
+ * we don't have any leftover errors from previous calls (OpenSSL docs).
+ */
+void cdp_openssl_clear_errors(void)
+{
+       int i;
+       char err[160];

Yep sounds more inline with docs, ofc! Initial 160 was inspired by the fix 
found in [rtpengine 
itself](https://github.com/sipwise/rtpengine/blob/eaf437615b772745208da61e51311b72df51e21c/recording-daemon/packet.c#L31)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3612#discussion_r1369767522
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/3612/review/1694240...@github.com>
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to