From 4b7d13b41ff3dd03e8490108f30277f5469d40bf Mon Sep 17 00:00:00 2001 From: Matthew Loper Date: Wed, 12 Jul 2000 19:46:08 +0000 Subject: Solaris fixes: make sure not to pass NULL to printf's %s svn path=/trunk/; revision=4119 --- camel/ChangeLog | 7 +++++++ camel/providers/imap/camel-imap-store.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index f08e851923..3b4abd304c 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,10 @@ +2000-07-12 Peter Williams + + * providers/imap/camel-imap-store.c (query_auth_types): Check for + NULL parameters when setting the exception so as to not crash on + Solaris (can't handle a %s passed NULL). + (imap_connect): Same. + 2000-07-12 Jeffrey Stedfast * providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index d516694c6e..eeb7bd7d90 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -196,7 +196,8 @@ query_auth_types (CamelService *service, CamelException *ex) if (!ret) { camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, "Could not connect to IMAP server on " - "%s.", service->url->host); + "%s.", service->url->host ? service->url->host : + "(unknown host)"); } return ret; @@ -248,7 +249,8 @@ imap_connect (CamelService *service, CamelException *ex) 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, + service->url->host ? service->url->host : "(unknown host)", + service->url->port ? service->url->port : "(unknown port)", strerror(errno)); if (fd > -1) close (fd); -- cgit v1.2.3