[evolution-data-server/camel-socks-proxy] Add function to replace CamelTcpStreamRaw's sockfd with another one
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/camel-socks-proxy] Add function to replace CamelTcpStreamRaw's sockfd with another one
- Date: Thu, 15 Jul 2010 21:15:17 +0000 (UTC)
commit 6e394236b3a08fa2321f48b05b9c345a4890f37e
Author: Federico Mena Quintero <federico novell com>
Date: Thu Jul 15 16:01:20 2010 -0500
Add function to replace CamelTcpStreamRaw's sockfd with another one
We need this in the TcpSSL stream to replace the normal socket with
the SSL-ified one.
Signed-off-by: Federico Mena Quintero <federico novell com>
camel/camel-tcp-stream-raw.c | 8 ++++++++
camel/camel-tcp-stream-raw.h | 2 ++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/camel/camel-tcp-stream-raw.c b/camel/camel-tcp-stream-raw.c
index a1fda2d..d911341 100644
--- a/camel/camel-tcp-stream-raw.c
+++ b/camel/camel-tcp-stream-raw.c
@@ -927,3 +927,11 @@ stream_get_file_desc (CamelTcpStream *stream)
return priv->sockfd;
}
+
+void
+_camel_tcp_stream_raw_replace_file_desc (CamelTcpStreamRaw *raw, PRFileDesc *new_file_desc)
+{
+ CamelTcpStreamRawPrivate *priv = raw->priv;
+
+ priv->sockfd = new_file_desc;
+}
diff --git a/camel/camel-tcp-stream-raw.h b/camel/camel-tcp-stream-raw.h
index d012095..c0aeab6 100644
--- a/camel/camel-tcp-stream-raw.h
+++ b/camel/camel-tcp-stream-raw.h
@@ -52,6 +52,8 @@ CamelType camel_tcp_stream_raw_get_type (void);
/* public methods */
CamelStream *camel_tcp_stream_raw_new (void);
+void _camel_tcp_stream_raw_replace_file_desc (CamelTcpStreamRaw *raw, PRFileDesc *new_file_desc);
+
void _set_errno_from_pr_error (gint pr_code);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]