From b1efae86ffbc9691842199d2587d6c20a93dda3f Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 26 Nov 2001 21:32:26 +0000 Subject: Check to see that errno is non-zero before returning g_strerror. If it's 2001-11-20 Jeffrey Stedfast * providers/smtp/camel-smtp-transport.c (get_smtp_error_string): Check to see that errno is non-zero before returning g_strerror. If it's 0, then we have an unknown error. svn path=/trunk/; revision=14790 --- camel/ChangeLog | 6 ++++++ camel/providers/smtp/camel-smtp-transport.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 6d4cc473e3..a0f424ee55 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2001-11-20 Jeffrey Stedfast + + * providers/smtp/camel-smtp-transport.c (get_smtp_error_string): + Check to see that errno is non-zero before returning + g_strerror. If it's 0, then we have an unknown error. + 2001-11-26 Jeffrey Stedfast * camel-mime-filter-basic.c: For the uudecoding mode, garble up diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c index c37b35ce44..73dfbea344 100644 --- a/camel/providers/smtp/camel-smtp-transport.c +++ b/camel/providers/smtp/camel-smtp-transport.c @@ -164,7 +164,10 @@ get_smtp_error_string (int error) switch (error) { case 0: /* looks like a read problem, check errno */ - return g_strerror (errno); + if (errno) + return g_strerror (errno); + else + return _("Unknown"); case 500: return _("Syntax error, command unrecognized"); case 501: -- cgit v1.2.3