aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-03-07 08:15:44 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-03-07 08:15:44 +0800
commitfb1819e374f6d663e7b1044e5beb280f56ddb6e6 (patch)
tree68b8ac5208e3df00e3c186bbd9e0c0092f47b6e6
parent3bc843ceb5bd66288077a4f8db1b6cdb7123f298 (diff)
downloadgsoc2013-evolution-fb1819e374f6d663e7b1044e5beb280f56ddb6e6.tar
gsoc2013-evolution-fb1819e374f6d663e7b1044e5beb280f56ddb6e6.tar.gz
gsoc2013-evolution-fb1819e374f6d663e7b1044e5beb280f56ddb6e6.tar.bz2
gsoc2013-evolution-fb1819e374f6d663e7b1044e5beb280f56ddb6e6.tar.lz
gsoc2013-evolution-fb1819e374f6d663e7b1044e5beb280f56ddb6e6.tar.xz
gsoc2013-evolution-fb1819e374f6d663e7b1044e5beb280f56ddb6e6.tar.zst
gsoc2013-evolution-fb1819e374f6d663e7b1044e5beb280f56ddb6e6.zip
Fix to work with OpenSSL.
2002-03-06 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (connect_to_server): Fix to work with OpenSSL. svn path=/trunk/; revision=15959
-rw-r--r--camel/ChangeLog3
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c8
2 files changed, 8 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index d3a42e55fe..4f91d680ac 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,8 @@
2002-03-06 Jeffrey Stedfast <fejj@ximian.com>
+ * providers/smtp/camel-smtp-transport.c (connect_to_server): Fix
+ to work with OpenSSL.
+
* camel-tcp-stream-openssl.c: compile fixes.
(camel_tcp_stream_openssl_enable_ssl): Check to make sure that the
sockfd != -1, it's not enough to check that it is non-zero. Also
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 310e2af2e7..3e80ae6e7e 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -245,6 +245,7 @@ connect_to_server (CamelService *service, int try_starttls, CamelException *ex)
struct hostent *h;
guint32 addrlen;
int port, ret;
+ int sockfd;
if (!CAMEL_SERVICE_CLASS (parent_class)->connect (service, ex))
return FALSE;
@@ -311,13 +312,14 @@ connect_to_server (CamelService *service, int try_starttls, CamelException *ex)
inet_aton (hname, (struct in_addr *)&transport->localaddr.sin_addr);
} else {
- int sockfd = GPOINTER_TO_INT (camel_tcp_stream_get_socket (CAMEL_TCP_STREAM (tcp_stream)));
+ sockfd = GPOINTER_TO_INT (camel_tcp_stream_get_socket (CAMEL_TCP_STREAM (tcp_stream)));
getsockname (sockfd, (struct sockaddr *)&transport->localaddr, &addrlen);
}
#else
- getsockname (CAMEL_TCP_STREAM_RAW (tcp_stream)->sockfd,
- (struct sockaddr *)&transport->localaddr, &addrlen);
+ sockfd = GPOINTER_TO_INT (camel_tcp_stream_get_socket (CAMEL_TCP_STREAM (tcp_stream)));
+
+ getsockname (sockfd, (struct sockaddr *)&transport->localaddr, &addrlen);
#endif /* HAVE_NSS */
transport->ostream = tcp_stream;