aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-11-27 05:32:26 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-11-27 05:32:26 +0800
commitb1efae86ffbc9691842199d2587d6c20a93dda3f (patch)
tree24a38ce5fb6595865023b08a7dbc89d5a4f80736 /camel/providers
parent722899621625bafb134152534a3af08a0c9ef837 (diff)
downloadgsoc2013-evolution-b1efae86ffbc9691842199d2587d6c20a93dda3f.tar
gsoc2013-evolution-b1efae86ffbc9691842199d2587d6c20a93dda3f.tar.gz
gsoc2013-evolution-b1efae86ffbc9691842199d2587d6c20a93dda3f.tar.bz2
gsoc2013-evolution-b1efae86ffbc9691842199d2587d6c20a93dda3f.tar.lz
gsoc2013-evolution-b1efae86ffbc9691842199d2587d6c20a93dda3f.tar.xz
gsoc2013-evolution-b1efae86ffbc9691842199d2587d6c20a93dda3f.tar.zst
gsoc2013-evolution-b1efae86ffbc9691842199d2587d6c20a93dda3f.zip
Check to see that errno is non-zero before returning g_strerror. If it's
2001-11-20 Jeffrey Stedfast <fejj@ximian.com> * 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
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c5
1 files changed, 4 insertions, 1 deletions
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: