changeset 11542:cda814bad7f8

[gaim-migrate @ 13797] Disconnect when registration fails. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 14 Sep 2005 04:11:42 +0000
parents 5fc015909164
children 8be7f4c472cf
files src/protocols/gg/gg.c
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/gg/gg.c	Wed Sep 14 03:41:32 2005 +0000
+++ b/src/protocols/gg/gg.c	Wed Sep 14 04:11:42 2005 +0000
@@ -1422,7 +1422,7 @@
 /* static void ggp_register_user(GaimAccount *account) {{{ */
 static void ggp_register_user(GaimAccount *account)
 {
-	GaimConnection *gc;
+	GaimConnection *gc = gaim_account_get_connection(account);
 	GaimRequestFields *fields;
 	GaimRequestFieldGroup *group;
 	GaimRequestField *field;
@@ -1435,14 +1435,11 @@
 	gaim_debug_info("gg", "token: requested.\n");
 
 	if ((req = gg_token(0)) == NULL) {
-		gaim_notify_error(account, _("Token Error"),
-				_("Unable to fetch the token.\n"), NULL);
+		gaim_connection_error(gc, _("Token Error : Unable to fetch the token.\n"));
 		return;
 	}
 	t = req->data;
 
-	gc = gaim_account_get_connection(account);
-
 	info = g_new0(GGPInfo, 1);
 	gc->proto_data = info;