mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
When returning G_IO_STATUS_ERROR in irssi_ssl_{read,write} create a GError with
the openssl error string. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4884 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
fc85d71d12
commit
b555e18985
@ -105,6 +105,8 @@ static GIOStatus irssi_ssl_read(GIOChannel *handle, gchar *buf, gsize len, gsize
|
||||
err = SSL_get_error(chan->ssl, err);
|
||||
if(err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
|
||||
return G_IO_STATUS_AGAIN;
|
||||
*gerr = g_error_new_literal(G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED,
|
||||
ERR_reason_error_string(ERR_get_error()));
|
||||
return G_IO_STATUS_ERROR;
|
||||
}
|
||||
else
|
||||
@ -128,6 +130,8 @@ static GIOStatus irssi_ssl_write(GIOChannel *handle, const gchar *buf, gsize len
|
||||
err = SSL_get_error(chan->ssl, err);
|
||||
if(err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
|
||||
return G_IO_STATUS_AGAIN;
|
||||
*gerr = g_error_new_literal(G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED,
|
||||
ERR_reason_error_string(ERR_get_error()));
|
||||
return G_IO_STATUS_ERROR;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user