From 5608af39dd66cbf0ce1bb7aa0a95a0c70ef092b3 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Sun, 14 Jan 2001 08:21:00 +0000 Subject: New CamelTcpStream class that implements nspr sockets and eventually will 2001-01-14 Jeffrey Stedfast * 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 --- camel/camel-stream-ssl.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'camel/camel-stream-ssl.c') 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 -- cgit