diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2008-11-02 14:49:48 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-11-02 14:49:48 +0000 |
commit | b555e1898593107fe3e87de55771f3959a51d582 (patch) | |
tree | 1bf4ef4051f6235a725c9314fdba7b893f5ff39f | |
parent | fc85d71d12340a8e4de6523db19cf9dff7d889e4 (diff) | |
download | irssi-b555e1898593107fe3e87de55771f3959a51d582.zip |
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
-rw-r--r-- | src/core/network-openssl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c index 219e6a5b..9e16b130 100644 --- a/src/core/network-openssl.c +++ b/src/core/network-openssl.c @@ -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 |