[Bug 69814] stop using the account id as a self id

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Sep 27 04:10:13 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=69814

--- Comment #8 from Simon McVittie <simon.mcvittie at collabora.co.uk> ---
Comment on attachment 86719
  --> https://bugs.freedesktop.org/attachment.cgi?id=86719
Prepare TpAccount if needed

Review of attachment 86719:
 --> (https://bugs.freedesktop.org/page.cgi?id=splinter.html&bug=69814&attachment=86719)
-----------------------------------------------------------------

r+ to everything above here.

Insta-r+ for this one if you add the comment and assertion:

::: telepathy-logger/log-manager.c
@@ +873,5 @@
> +typedef struct
> +{
> +  GSimpleAsyncResult *result;
> +  GSimpleAsyncThreadFunc func;
> +} AsyncOpData;

If you used GTask you might not need this, but I think that's a job for
post-1.0.

@@ +923,5 @@
> +  if (account != NULL)
> +    {
> +      GQuark features[] = { TP_ACCOUNT_FEATURE_CORE, 0 };
> +
> +      /* Most API rely on TpAccount being prepared so make sure it is */

I think it's worth being more specific, something like this:

       /* Most APIs rely on TpAccount being prepared, so make sure
        * it is. telepathy-glib is not thread-safe, so we must do
        * this in the main thread, before starting the actual
        * operation in the other thread. */

You can just use features = NULL I think? (No harm in being explicit, though.)

::: tests/dbus/test-log-manager.c
@@ +402,5 @@
> +  account_path = g_value_get_string (
> +      (const GValue *) g_hash_table_lookup (params, "account-path"));
> +
> +  account = tp_simple_client_factory_ensure_account (fixture->factory,
> +      account_path, NULL, NULL);

If you intend the account to be unprepared here, please assert that it is
unprepared.

(If it might be prepared already, you might have to create a new factory per
test run in order to ensure duplication...)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the telepathy-bugs mailing list