]> git.0d.be Git - empathy.git/commit
account-settings: don't set the presence on newly created accounts
authorMarco Barisione <marco.barisione@collabora.co.uk>
Wed, 8 May 2013 14:45:45 +0000 (15:45 +0100)
committerMarco Barisione <marco.barisione@collabora.co.uk>
Tue, 20 Aug 2013 10:03:05 +0000 (11:03 +0100)
commit740b695e21016ff7b568b069734b29e780b459e5
treee8d3ff545a2e4ef4622058fb4954d0399f3d9819
parent654aaea6780716ff7973530859d2b1b86e2f7ca3
account-settings: don't set the presence on newly created accounts

What happened before this patch was:
1) tpaw_account_settings_do_create_account() sets the requested presence
   to the global requested presence in Empathy;
2) If the requested presence is unset, unknown or offline,
   empathy_connect_new_account() sets it to available;
3) Every process with a TpAccountManager object in memory that was
   previously used to set the requested presence will try to set the
   presence on the new account.

The first step is a problem as it doesn't work if the account is created
by a process that is not Empathy as the other processes have no way of
knowing what Empathy's requested presence is.
This doesn't matter as, in the third step, both Empathy and gnome-shell
(and any other process using a TpAccountManager) will try to set the
presence to their own idea of the current requested presence. Of course
this is a race condition, see [1], but the behaviour is not changed by
this patch.
In case there is no process using a TpAccountManager, the second step
will still guarantee that the newly created account goes online.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=24104

https://bugzilla.gnome.org/show_bug.cgi?id=699492
tp-account-widgets/tpaw-account-settings.c