Call ERR_clear_error() where necessary
This commit is contained in:
@@ -281,6 +281,7 @@ irc_send (struct bot_context *ctx, const char *format, ...)
|
||||
if (ctx->ssl)
|
||||
{
|
||||
// TODO: call SSL_get_error() to detect if a clean shutdown has occured
|
||||
ERR_clear_error ();
|
||||
if (SSL_write (ctx->ssl, str.str, str.len) != (int) str.len)
|
||||
{
|
||||
print_debug ("%s: %s: %s", __func__, "SSL_write",
|
||||
@@ -1447,6 +1448,7 @@ irc_fill_read_buffer_ssl (struct bot_context *ctx, struct str *buf)
|
||||
{
|
||||
int n_read;
|
||||
start:
|
||||
ERR_clear_error ();
|
||||
n_read = SSL_read (ctx->ssl, buf->str + buf->len,
|
||||
buf->alloc - buf->len - 1 /* null byte */);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user