changeset 20116:a61aa7cc757d

Use purple_connection_ssl_error in prpl-irc
author Will Thompson <will.thompson@collabora.co.uk>
date Wed, 19 Sep 2007 15:01:47 +0000
parents a68d51d60177
children f24a2cacacd1
files libpurple/protocols/irc/irc.c
diffstat 1 files changed, 1 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/irc/irc.c	Wed Sep 19 15:00:48 2007 +0000
+++ b/libpurple/protocols/irc/irc.c	Wed Sep 19 15:01:47 2007 +0000
@@ -442,21 +442,7 @@
 
 	irc->gsc = NULL;
 
-	switch (error) {
-		case PURPLE_SSL_HANDSHAKE_FAILED:
-		case PURPLE_SSL_CONNECT_FAILED:
-			reason = PURPLE_REASON_ENCRYPTION_ERROR;
-			break;
-		case PURPLE_SSL_CERTIFICATE_INVALID:
-			/* TODO: maybe PURPLE_SSL_* should be more specific? */
-			reason = PURPLE_REASON_CERT_OTHER_ERROR;
-			break;
-		default:
-			g_assert_not_reached ();
-			reason = PURPLE_REASON_ENCRYPTION_ERROR;
-	}
-
-	purple_connection_error_reason (gc, reason, purple_ssl_strerror(error));
+	purple_connection_ssl_error (gc, error);
 }
 
 static void irc_close(PurpleConnection *gc)