diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-11-27 05:32:26 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-11-27 05:32:26 +0800 |
commit | b1efae86ffbc9691842199d2587d6c20a93dda3f (patch) | |
tree | 24a38ce5fb6595865023b08a7dbc89d5a4f80736 /camel | |
parent | 722899621625bafb134152534a3af08a0c9ef837 (diff) | |
download | gsoc2013-evolution-b1efae86ffbc9691842199d2587d6c20a93dda3f.tar.gz 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')
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/providers/smtp/camel-smtp-transport.c | 5 |
2 files changed, 10 insertions, 1 deletions
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 <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. + 2001-11-26 Jeffrey Stedfast <fejj@ximian.com> * 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: |