diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2001-01-14 16:21:00 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-01-14 16:21:00 +0800 |
commit | 5608af39dd66cbf0ce1bb7aa0a95a0c70ef092b3 (patch) | |
tree | c46493d362a818fa54aa9478b510c304e302a5eb /camel/camel-stream-ssl.c | |
parent | e973bab4803d9333b89db18152313b5b4089dc22 (diff) | |
download | gsoc2013-evolution-5608af39dd66cbf0ce1bb7aa0a95a0c70ef092b3.tar.gz gsoc2013-evolution-5608af39dd66cbf0ce1bb7aa0a95a0c70ef092b3.tar.zst gsoc2013-evolution-5608af39dd66cbf0ce1bb7aa0a95a0c70ef092b3.zip |
New CamelTcpStream class that implements nspr sockets and eventually will
2001-01-14 Jeffrey Stedfast <fejj@helixcode.com>
* camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that
implements nspr sockets and eventually will use nss for
SSL/TLS. Currently doesn't do any SSL/TLS but it should still
work. It's functionally equivalent to CamelTcpStreamRaw at the
moment only it uses nspr i/o.
* camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that
implements native sockets. Should be usable but may have some bugs
yet.
svn path=/trunk/; revision=7489
Diffstat (limited to 'camel/camel-stream-ssl.c')
-rw-r--r-- | camel/camel-stream-ssl.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/camel/camel-stream-ssl.c b/camel/camel-stream-ssl.c index e91d6f60db..9e328e47fe 100644 --- a/camel/camel-stream-ssl.c +++ b/camel/camel-stream-ssl.c @@ -49,7 +49,7 @@ camel_stream_ssl_class_init (CamelStreamSSLClass *camel_stream_ssl_class) CamelStreamClass *camel_stream_class = CAMEL_STREAM_CLASS (camel_stream_ssl_class); - parent_class = CAMEL_STREAM_CLASS (camel_type_get_global_classfuncs (camel_seekable_stream_get_type ())); + parent_class = CAMEL_STREAM_CLASS (camel_type_get_global_classfuncs (camel_stream_get_type ())); /* virtual method overload */ camel_stream_class->read = stream_read; @@ -70,7 +70,7 @@ camel_stream_ssl_init (gpointer object, gpointer klass) static void camel_stream_ssl_finalize (CamelObject *object) { - CamelStreamSSL *stream = CAMEL_STREAM_FS (object); + CamelStreamSSL *stream = CAMEL_STREAM_SSL (object); if (stream->ssl) { SSL_shutdown (stream->ssl); @@ -89,20 +89,20 @@ camel_stream_ssl_finalize (CamelObject *object) CamelType camel_stream_ssl_get_type (void) { - static CamelType camel_stream_ssl_type = CAMEL_INVALID_TYPE; - - if (camel_stream_ssl_type == CAMEL_INVALID_TYPE) { - camel_stream_ssl_type = - camel_type_register (camel_stream_get_type (), "CamelStreamSSL", - sizeof (CamelStreamSSL), - sizeof (CamelStreamSSLClass), - (CamelObjectClassInitFunc) camel_stream_ssl_class_init, - NULL, - (CamelObjectInitFunc) camel_stream_ssl_init, - (CamelObjectFinalizeFunc) camel_stream_ssl_finalize); + static CamelType type = CAMEL_INVALID_TYPE; + + if (type == CAMEL_INVALID_TYPE) { + type = camel_type_register (camel_stream_get_type (), + "CamelStreamSSL", + sizeof (CamelStreamSSL), + sizeof (CamelStreamSSLClass), + (CamelObjectClassInitFunc) camel_stream_ssl_class_init, + NULL, + (CamelObjectInitFunc) camel_stream_ssl_init, + (CamelObjectFinalizeFunc) camel_stream_ssl_finalize); } - return camel_stream_ssl_type; + return type; } static int |