diff options
author | Dan Winship <danw@src.gnome.org> | 2001-09-28 22:36:44 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-09-28 22:36:44 +0800 |
commit | 59eb8e34ef6494dd612671bde8c14dfdf0fef958 (patch) | |
tree | ad053ff1690e3c87825c50918be21d0246d16f78 /camel/camel-tcp-stream-openssl.c | |
parent | e1b0cfa7a5ca5bc3621d647ff805192e5fdb2790 (diff) | |
download | gsoc2013-evolution-59eb8e34ef6494dd612671bde8c14dfdf0fef958.tar.gz gsoc2013-evolution-59eb8e34ef6494dd612671bde8c14dfdf0fef958.tar.zst gsoc2013-evolution-59eb8e34ef6494dd612671bde8c14dfdf0fef958.zip |
Make this take an SSL * instead of a CamelTcpStreamSSL *, since it can get
* camel-tcp-stream-openssl.c (ssl_error_to_errno): Make this take
an SSL * instead of a CamelTcpStreamSSL *, since it can get called
from open_ssl_connection, when the CamelTcpStreamSSL isn't set up
right yet. Fixes a crash on connection failure.
svn path=/trunk/; revision=13213
Diffstat (limited to 'camel/camel-tcp-stream-openssl.c')
-rw-r--r-- | camel/camel-tcp-stream-openssl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/camel/camel-tcp-stream-openssl.c b/camel/camel-tcp-stream-openssl.c index 0d00468c5b..a940f2419a 100644 --- a/camel/camel-tcp-stream-openssl.c +++ b/camel/camel-tcp-stream-openssl.c @@ -184,11 +184,11 @@ errlib_error_to_errno (int ret) } static void -ssl_error_to_errno (CamelTcpStreamOpenSSL *stream, int ret) +ssl_error_to_errno (SSL *ssl, int ret) { /* hm, a CamelException might be useful right about now! */ - switch (SSL_get_error (stream->priv->ssl, ret)) { + switch (SSL_get_error (ssl, ret)) { case SSL_ERROR_NONE: errno = 0; return; @@ -271,7 +271,7 @@ stream_read (CamelStream *stream, char *buffer, size_t n) } if (nread == -1) - ssl_error_to_errno (tcp_stream_openssl, -1); + ssl_error_to_errno (tcp_stream_openssl->priv->ssl, -1); return nread; } @@ -337,7 +337,7 @@ stream_write (CamelStream *stream, const char *buffer, size_t n) } if (written == -1) - ssl_error_to_errno (tcp_stream_openssl, -1); + ssl_error_to_errno (tcp_stream_openssl->priv->ssl, -1); return written; } @@ -526,7 +526,7 @@ open_ssl_connection (CamelService *service, int sockfd, CamelTcpStreamOpenSSL *o n = SSL_connect (ssl); if (n != 1) { - ssl_error_to_errno (openssl, n); + ssl_error_to_errno (ssl, n); SSL_shutdown (ssl); |