[Bug 29563] New: mcd_account_manager_write_conf_async() is synchronous; UpdateParameters() is correct by accident for keyfiles, and wrong for accounts-glib.
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Aug 13 18:33:53 CEST 2010
https://bugs.freedesktop.org/show_bug.cgi?id=29563
Summary: mcd_account_manager_write_conf_async() is synchronous;
UpdateParameters() is correct by accident for
keyfiles, and wrong for accounts-glib.
Product: Telepathy
Version: git master
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: mission-control
AssignedTo: telepathy-bugs at lists.freedesktop.org
ReportedBy: will.thompson at collabora.co.uk
QAContact: telepathy-bugs at lists.freedesktop.org
So. I found a note on an old TODO list saying that UpdateParameters() may
return before the changes are written to disk. I don't think this is *that* big
a deal, though it'd be nice to be sure. So I thought I'd check.
It turns out that update_parameters_dup_params_cb() — which is the last step in
the UpdateParameters() implementation — calls
mcd_account_manager_write_conf_async(), but then immediately calls
tp_svc_account_return_from_update_parameters() without waiting for
write_conf_async() to call the callback (which is NULL in any case). Horror of
horrors!
But actually... mcd_account_manager_write_conf_async() synchronously tells each
backend to commit. And the commit() implementation for the keyfile backend is
synchronous. So the implementation is correct by accident.
The commit() implementation for accounts-glib, on the other hand, is
asynchronous. But since the commit() API doesn't allow returning
asynchronously, it always returns success, and just logs a debug message if the
changes weren't committed. So the plugin API is at fault here.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list