Mercurial > pidgin
changeset 18969:17a6a99e7230
- Replace switch statements in irc and jabber prpls with purple_ssl_strerror calls
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Wed, 27 Jun 2007 05:03:25 +0000 |
parents | 1677ead39ee3 |
children | 3d63bd78675d |
files | libpurple/protocols/irc/irc.c libpurple/protocols/jabber/jabber.c |
diffstat | 2 files changed, 2 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/irc/irc.c Wed Jun 27 04:56:21 2007 +0000 +++ b/libpurple/protocols/irc/irc.c Wed Jun 27 05:03:25 2007 +0000 @@ -433,14 +433,7 @@ irc->gsc = NULL; - switch(error) { - case PURPLE_SSL_CONNECT_FAILED: - purple_connection_error(gc, _("Connection Failed")); - break; - case PURPLE_SSL_HANDSHAKE_FAILED: - purple_connection_error(gc, _("SSL Handshake Failed")); - break; - } + purple_connection_error(gc, purple_ssl_strerror(error)); } static void irc_close(PurpleConnection *gc)
--- a/libpurple/protocols/jabber/jabber.c Wed Jun 27 04:56:21 2007 +0000 +++ b/libpurple/protocols/jabber/jabber.c Wed Jun 27 05:03:25 2007 +0000 @@ -494,19 +494,7 @@ js = gc->proto_data; js->gsc = NULL; - switch(error) { - case PURPLE_SSL_CONNECT_FAILED: - purple_connection_error(gc, _("Connection Failed")); - break; - case PURPLE_SSL_HANDSHAKE_FAILED: - purple_connection_error(gc, _("SSL Handshake Failed")); - break; - case PURPLE_SSL_CERTIFICATE_INVALID: - purple_connection_error(gc, _("Peer presented invalid certificate")); - break; - default: - purple_connection_error(gc, _("Unknown SSL error")); - } + purple_connection_error(gc, purple_ssl_strerror(error)); } static void tls_init(JabberStream *js)