pidgin: 40d00036: Don't debug print that we are connecting...

deryni at pidgin.im deryni at pidgin.im
Sun Jul 5 11:16:03 EDT 2009


-----------------------------------------------------------------
Revision: 40d000364c4c9c5b0a3971fbe7bb4878e3737202
Ancestor: b6b4424faed121ef1adf7ebbc9fc67161e69bf7d
Author: deryni at pidgin.im
Date: 2009-05-08T00:42:23
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/40d000364c4c9c5b0a3971fbe7bb4878e3737202

Modified files:
        libpurple/account.c

ChangeLog: 

Don't debug print that we are connecting an account until we are reasonably
sure we can actually do that. Also debug print when someone attempts to
connect a disabled account.

-------------- next part --------------
============================================================
--- libpurple/account.c	7f67a5a8076d88496dd0f19fcc58aa185b8425c3
+++ libpurple/account.c	e07a0db32aedf52ce3d8cb00f51c9f7418947aef
@@ -1129,29 +1129,32 @@ purple_account_connect(PurpleAccount *ac
 purple_account_connect(PurpleAccount *account)
 {
 	PurplePlugin *prpl;
+	const char *password, *username;
 	PurplePluginProtocolInfo *prpl_info;
-	const char *password;
 
 	g_return_if_fail(account != NULL);
 
-	purple_debug_info("account", "Connecting to account %s\n",
-					purple_account_get_username(account));
+	username = purple_account_get_username(account);
 
-	if (!purple_account_get_enabled(account, purple_core_get_ui()))
+	if (!purple_account_get_enabled(account, purple_core_get_ui())) {
+		purple_debug_info("account",
+				  "Account %s not enabled, not connecting.\n",
+				  username);
 		return;
+	}
 
 	prpl = purple_find_prpl(purple_account_get_protocol_id(account));
-	if (prpl == NULL)
-	{
+	if (prpl == NULL) {
 		gchar *message;
 
-		message = g_strdup_printf(_("Missing protocol plugin for %s"),
-			purple_account_get_username(account));
+		message = g_strdup_printf(_("Missing protocol plugin for %s"), username);
 		purple_notify_error(account, _("Connection Error"), message, NULL);
 		g_free(message);
 		return;
 	}
 
+	purple_debug_info("account", "Connecting to account %s.\n", username);
+
 	prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
 	password = purple_account_get_password(account);
 	if ((password == NULL) &&


More information about the Commits mailing list