aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-06 13:11:11 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-06 13:11:11 +0800
commitaf494c55837bf4d88c421ce6ce3f8378727998c7 (patch)
treedc4a2d2e98ec5b6851c5955464577ab9a2482da2
parentb226c0a68fb89c074b5c5655e9469d692f71c988 (diff)
downloadgsoc2013-evolution-af494c55837bf4d88c421ce6ce3f8378727998c7.tar.gz
gsoc2013-evolution-af494c55837bf4d88c421ce6ce3f8378727998c7.tar.zst
gsoc2013-evolution-af494c55837bf4d88c421ce6ce3f8378727998c7.zip
Oops. Don't pass port # as a string in the error code (if it fails to
2000-07-06 Jeffrey Stedfast <fejj@helixcode.com> * 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
-rw-r--r--camel/ChangeLog3
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c9
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 <fejj@helixcode.com>
+ * 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);