[evolution-data-server/camel-socks-proxy-master: 10/10] Implement ::get_file_desc() in CamelTcpStreamSSL
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/camel-socks-proxy-master: 10/10] Implement ::get_file_desc() in CamelTcpStreamSSL
- Date: Sat, 24 Jul 2010 03:06:45 +0000 (UTC)
commit 9f47010f4770a62489941e654675cc3893cc3d5c
Author: Federico Mena Quintero <federico novell com>
Date: Wed Jul 14 16:15:23 2010 -0500
Implement ::get_file_desc() in CamelTcpStreamSSL
This lets us get rid of camel_tcp_stream_ssl_sockfd(), in favor
of camel_tcp_stream_get_file_desc().
Signed-off-by: Federico Mena Quintero <federico novell com>
camel/camel-tcp-stream-ssl.c | 17 ++++++-----------
camel/camel-tcp-stream-ssl.h | 2 --
camel/providers/imapx/camel-imapx-server.c | 2 +-
3 files changed, 7 insertions(+), 14 deletions(-)
---
diff --git a/camel/camel-tcp-stream-ssl.c b/camel/camel-tcp-stream-ssl.c
index 3fe56de..2a495a6 100644
--- a/camel/camel-tcp-stream-ssl.c
+++ b/camel/camel-tcp-stream-ssl.c
@@ -1415,18 +1415,12 @@ tcp_stream_ssl_get_remote_address (CamelTcpStream *stream,
return sockaddr_from_praddr(&addr, len);
}
-/**
- * camel_tcp_stream_ssl_sockfd:
- * @stream: a #CamelTcpStreamSSL
- *
- * FIXME Document me!
- *
- * Since: 2.30
- **/
-PRFileDesc *
-camel_tcp_stream_ssl_sockfd (CamelTcpStreamSSL *stream)
+static PRFileDesc *
+tcp_stream_ssl_get_file_desc (CamelTcpStream *stream)
{
- return stream->priv->sockfd;
+ CamelTcpStreamSSL *ssl = CAMEL_TCP_STREAM_SSL (stream);
+
+ return ssl->priv->sockfd;
}
static void
@@ -1454,6 +1448,7 @@ camel_tcp_stream_ssl_class_init (CamelTcpStreamSSLClass *class)
tcp_stream_class->setsockopt = tcp_stream_ssl_setsockopt;
tcp_stream_class->get_local_address = tcp_stream_ssl_get_local_address;
tcp_stream_class->get_remote_address = tcp_stream_ssl_get_remote_address;
+ tcp_stream_class->get_file_desc = tcp_stream_ssl_get_file_desc;
}
static void
diff --git a/camel/camel-tcp-stream-ssl.h b/camel/camel-tcp-stream-ssl.h
index 928f578..6e63579 100644
--- a/camel/camel-tcp-stream-ssl.h
+++ b/camel/camel-tcp-stream-ssl.h
@@ -81,8 +81,6 @@ CamelStream *camel_tcp_stream_ssl_new_raw (struct _CamelSession *session, const
gint camel_tcp_stream_ssl_enable_ssl (CamelTcpStreamSSL *ssl);
-PRFileDesc * camel_tcp_stream_ssl_sockfd (CamelTcpStreamSSL *stream);
-
G_END_DECLS
#endif /* HAVE_SSL */
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index fcd5af1..8bf9593 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -4598,7 +4598,7 @@ imapx_parser_thread (gpointer d)
PRPollDesc pollfds[2] = { };
gint res;
- pollfds[0].fd = camel_tcp_stream_ssl_sockfd ((CamelTcpStreamSSL *)is->stream->source);
+ pollfds[0].fd = camel_tcp_stream_get_file_desc (CAMEL_TCP_STREAM (is->stream->source));
pollfds[0].in_flags = PR_POLL_READ;
pollfds[1].fd = camel_operation_cancel_prfd (op);
pollfds[1].in_flags = PR_POLL_READ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]