Bug 32414 - Dramatically simplify getting the dict of account parameters
Summary: Dramatically simplify getting the dict of account parameters
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: mission-control (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/wj...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-12-15 09:23 UTC by Will Thompson
Modified: 2010-12-17 05:26 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Will Thompson 2010-12-15 09:23:36 UTC
_mcd_account_dup_parameters() is asynchronous for no good reason. These days, getting each parameter from the relevant storage backend is synchronous, so there's this whole pile of complexity which doesn't add anything. Here's a branch that removes it. It makes things much easier to read, and removes a tonne of code.

 src/Makefile.am                                |    1 -
 src/mcd-account-connection.c                   |   31 +-
 src/mcd-account-manager.c                      |   14 +-
 src/mcd-account-manager.h                      |    3 -
 src/mcd-account-priv.h                         |    5 +-
 src/mcd-account.c                              |  714 ++++++++----------------
 src/mcd-account.h                              |   23 +-
 src/mcd-dbusprop.c                             |   67 +--
 src/mcd-dbusprop.h                             |    1 -
 src/mcd-dispatch-operation.c                   |    9 +-
 src/mcd-dispatcher.c                           |    6 +-
 src/mcd-dispatcher.h                           |    5 -
 src/mcd-presence-frame.h                       |   13 -
 src/plugin-account.c                           |    8 +-
 test/twisted/account-manager/account-basics.py |    2 +-
 15 files changed, 295 insertions(+), 607 deletions(-)
Comment 1 Simon McVittie 2010-12-15 11:14:03 UTC
The second-from-last patch was indeed pretty tangled, but it looks OK to me, inasmuch as I can tell...

(Perhaps it'd have been less tangled if you renamed _mcd_account_dup_parameters to ..._async, then introduced the new synchronous _mcd_account_dup_parameters, then ported one bit at a time?)
Comment 2 Will Thompson 2010-12-15 11:25:30 UTC
(In reply to comment #1)
> (Perhaps it'd have been less tangled if you renamed _mcd_account_dup_parameters
> to ..._async, then introduced the new synchronous _mcd_account_dup_parameters,
> then ported one bit at a time?)

I did actually start off doing that, but gave up. :)
Comment 3 Will Thompson 2010-12-17 05:26:33 UTC
Merged; will be in 5.7.2


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.