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
This commit is contained in:

committed by
Jeffrey Stedfast

parent
3bc843ceb5
commit
fb1819e374
@ -1,5 +1,8 @@
|
|||||||
2002-03-06 Jeffrey Stedfast <fejj@ximian.com>
|
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.c: compile fixes.
|
||||||
(camel_tcp_stream_openssl_enable_ssl): Check to make sure that the
|
(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
|
sockfd != -1, it's not enough to check that it is non-zero. Also
|
||||||
|
@ -245,6 +245,7 @@ connect_to_server (CamelService *service, int try_starttls, CamelException *ex)
|
|||||||
struct hostent *h;
|
struct hostent *h;
|
||||||
guint32 addrlen;
|
guint32 addrlen;
|
||||||
int port, ret;
|
int port, ret;
|
||||||
|
int sockfd;
|
||||||
|
|
||||||
if (!CAMEL_SERVICE_CLASS (parent_class)->connect (service, ex))
|
if (!CAMEL_SERVICE_CLASS (parent_class)->connect (service, ex))
|
||||||
return FALSE;
|
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);
|
inet_aton (hname, (struct in_addr *)&transport->localaddr.sin_addr);
|
||||||
} else {
|
} 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);
|
getsockname (sockfd, (struct sockaddr *)&transport->localaddr, &addrlen);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
getsockname (CAMEL_TCP_STREAM_RAW (tcp_stream)->sockfd,
|
sockfd = GPOINTER_TO_INT (camel_tcp_stream_get_socket (CAMEL_TCP_STREAM (tcp_stream)));
|
||||||
(struct sockaddr *)&transport->localaddr, &addrlen);
|
|
||||||
|
getsockname (sockfd, (struct sockaddr *)&transport->localaddr, &addrlen);
|
||||||
#endif /* HAVE_NSS */
|
#endif /* HAVE_NSS */
|
||||||
|
|
||||||
transport->ostream = tcp_stream;
|
transport->ostream = tcp_stream;
|
||||||
|
Reference in New Issue
Block a user