From af494c55837bf4d88c421ce6ce3f8378727998c7 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 6 Jul 2000 05:11:11 +0000 Subject: Oops. Don't pass port # as a string in the error code (if it fails to 2000-07-06 Jeffrey Stedfast * providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't pass port # as a string in the error code (if it fails to connect). svn path=/trunk/; revision=3917 --- camel/ChangeLog | 3 +++ camel/providers/smtp/camel-smtp-transport.c | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 7ece9b58fd..a723b43f58 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,8 @@ 2000-07-06 Jeffrey Stedfast + * providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't + pass port # as a string in the error code (if it fails to connect). + * providers/imap/camel-imap-folder.c (imap_append_message): Changed over to camel_imap_command_extended as that was the source of the problems - apparently appending replies with more than just 1 line. diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c index 6188015bc8..beee253cd5 100644 --- a/camel/providers/smtp/camel-smtp-transport.c +++ b/camel/providers/smtp/camel-smtp-transport.c @@ -154,11 +154,12 @@ smtp_connect (CamelService *service, CamelException *ex) memcpy (&sin.sin_addr, h->h_addr, sizeof (sin.sin_addr)); fd = socket (h->h_addrtype, SOCK_STREAM, 0); - if (fd == -1 || connect (fd, (struct sockaddr *)&sin, sizeof(sin)) == -1) { + if (fd == -1 || connect (fd, (struct sockaddr *)&sin, sizeof (sin)) == -1) { camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, - "Could not connect to %s (port %s): %s", - service->url->host, service->url->port, - strerror(errno)); + "Could not connect to %s (port %d): %s", + service->url->host, + service->url->port ? service->url->port : SMTP_PORT, + strerror (errno)); if (fd > -1) close (fd); g_free (pass); -- cgit