[Bug 71384] improve account storage GInterface
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Nov 8 16:50:46 PST 2013
https://bugs.freedesktop.org/show_bug.cgi?id=71384
--- Comment #9 from Xavier Claessens <xclaesse at gmail.com> ---
(In reply to comment #3)
> Reviewing your version of the -ring plugin (Cc John since most of this is
> probably how it already works):
>
> > G_DEFINE_TYPE_WITH_CODE (McpAccountManagerRing, mcp_account_manager_ring,
>
> This should be called RingAccountStorage or something. It implements
> McpAccountStorage, not McpAccountManager; and it isn't part of
> libmission-control-plugins, so it shouldn't have a Mcp prefix.
GOA and UOA plugins does the same, but I agree it should be fixed.
Not done yet.
> > account_name = mcp_account_manager_get_unique_name (self->priv->am,
> > "ring", "tel", "account");
>
> I realize this is necessary if you want the first account to be
> ring/tel/account0 for compatibility or something.
Indeed I did that for backward compatibility because Jolla harcode
ring/tel/account0 in some places (Nokia did the same) but we could fix that
upstream and jolla can trivially patch back their package if needed.
Not done yet.
> > PARAM ("always_dispatch", "true");
Removed, MC now does the right thing.
> > /* It does not use self->priv->proxy_manager here because self could have been
> > * disposed, in which case we'll get a cancelled error. */
> > proxy = g_dbus_proxy_new_finish (result, &error);
>
> !!!
>
> Passing around objects that might have been disposed: generally bad news. I
> would recommend either making the user_data a TpWeakRef or GWeakRef or
> something (to make the "is it dead?" explicit), or taking a ref when you
> start the call and unreffing it in the callback.
Fixed by taking a strong ref.
I did lots of other changes in my branch. The account is enabled iff the modem
is powered.
--
You are receiving this mail because:
You are the QA Contact for the bug.
More information about the telepathy-bugs
mailing list