/srv/mercurial-server/detachablepurple: a9f360203fa6: In remote ...
Gilles Bedel
gillux at cpw.pidgin.im
Fri Jun 15 22:01:29 EDT 2012
Changeset: a9f360203fa69514f3b674a2058528a571b5ba75
Author: Gilles Bedel <gillux at cpw.pidgin.im>
Date: 2011-05-15 03:00 +0000
Branch: cpw.gillux.detachablepurple
URL: http://hg.pidgin.im/srv/mercurial-server/detachablepurple/rev/a9f360203fa6
Description:
In remote mode, avoid autoconnecting the enabled accounts on startup.
diffstat:
libpurple/account.c | 4 ++++
libpurple/accountlist.c | 12 +++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diffs (38 lines):
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -2945,6 +2945,10 @@
return;
}
+ /* In remote mode, the daemon already restored the statuses. */
+ if (purple_core_is_remote_mode())
+ return;
+
for (l = purple_accounts_all(); l != NULL; l = l->next)
{
account = (PurpleAccount *)l->data;
diff --git a/libpurple/accountlist.c b/libpurple/accountlist.c
--- a/libpurple/accountlist.c
+++ b/libpurple/accountlist.c
@@ -692,13 +692,15 @@
/* Make the enabled accounts to connect, as if we ran
* purple_account_set_enabled(). */
- while (accounts != NULL) {
- PurpleAccount *account = accounts->data;
+ if (!purple_core_is_remote_mode()) { /* Except in remote mode. */
+ while (accounts != NULL) {
+ PurpleAccount *account = accounts->data;
- if (purple_account_get_enabled(account))
- account_enabled_cb(account);
+ if (purple_account_get_enabled(account))
+ account_enabled_cb(account);
- accounts = accounts->next;
+ accounts = accounts->next;
+ }
}
}
More information about the Commits
mailing list