aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@src.gnome.org>2000-05-12 04:45:44 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-05-12 04:45:44 +0800
commitd41602b8ecf24d2c99ce52a4f3fd1ed6a6300d34 (patch)
tree7d0516002cb405fe9701a30f33d82ad63095d372 /camel/providers
parent0aafb55e25e436ab2759f51012b03ae70fa07f6f (diff)
downloadgsoc2013-evolution-d41602b8ecf24d2c99ce52a4f3fd1ed6a6300d34.tar.gz
gsoc2013-evolution-d41602b8ecf24d2c99ce52a4f3fd1ed6a6300d34.tar.zst
gsoc2013-evolution-d41602b8ecf24d2c99ce52a4f3fd1ed6a6300d34.zip
camel-smtp-transport.c will now compile :)
svn path=/trunk/; revision=2993
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index e76815a795..ef20a06e8c 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -47,8 +47,6 @@
/* Specified in RFC 821 */
#define SMTP_PORT 25
-static CamelServiceClass *service_class = NULL;
-
/* camel smtp transport class prototypes */
static gboolean _can_send (CamelTransport *transport, CamelMedium *message);
static gboolean _send (CamelTransport *transport, CamelMedium *message, CamelException *ex);
@@ -68,8 +66,10 @@ static gboolean smtp_data (CamelSmtpTransport *transport, CamelMedium *message,
static gboolean smtp_rset (CamelSmtpTransport *transport, CamelException *ex);
static gboolean smtp_quit (CamelSmtpTransport *transport, CamelException *ex);
-
+/* private data members */
+static CamelServiceClass *service_class = NULL;
static gboolean smtp_is_esmtp = FALSE;
+static struct sockaddr_in localaddr;
static void
camel_smtp_transport_class_init (CamelSmtpTransportClass *camel_smtp_transport_class)
@@ -130,6 +130,7 @@ smtp_connect (CamelService *service, CamelException *ex)
struct hostent *h;
struct sockaddr_in sin;
gint fd;
+ guint32 addrlen;
gchar *pass = NULL, *respbuf = NULL;
CamelSmtpTransport *transport = CAMEL_SMTP_TRANSPORT (service);
@@ -156,6 +157,10 @@ smtp_connect (CamelService *service, CamelException *ex)
return FALSE;
}
+ /* get the localaddr - needed later by smtp_helo */
+ addrlen = sizeof(localaddr);
+ getsockname(sock, (struct sockaddr*)&localaddr, &addrlen);
+
transport->ostream = camel_stream_fs_new_with_fd (fd);
transport->istream = camel_stream_buffer_new (transport->ostream,
CAMEL_STREAM_BUFFER_READ);
@@ -436,13 +441,9 @@ smtp_helo (CamelSmtpTransport *transport, CamelException *ex)
{
/* say hello to the server */
gchar *cmdbuf, *respbuf = NULL;
- struct sockaddr_in localaddr;
- guint32 addrlen;
struct hostent *host;
/* get the local host name */
- addrlen = sizeof(localaddr);
- getsockname(sock, (struct sockaddr*)&localaddr, &addrlen);
host = gethostbyaddr((gchar *)&localaddr.sin_addr, sizeof(localaddr.sin_addr), AF_INET);
/* hiya server! how are you today? */