Bug 68892 - tp_list_connection_managers_async does not invoke the callback if there are no CMs
Summary: tp_list_connection_managers_async does not invoke the callback if there are n...
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: git master
Hardware: All Linux (All)
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-03 15:53 UTC by Debarshi Ray
Modified: 2014-03-17 16:29 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
connection-manager: factor out all_cms_prepared() (2.46 KB, patch)
2014-03-17 15:49 UTC, Guillaume Desmottes
Details | Splinter Review
tp_list_connection_managers_async: terminate properly if there is no CM (3.92 KB, patch)
2014-03-17 15:49 UTC, Guillaume Desmottes
Details | Splinter Review

Description Debarshi Ray 2013-09-03 15:53:24 UTC
The GNOME OSTree images don't have any connection managers in them. They only have telepathy-glib and telepathy-mission-control. On such a setup tp_list_connection_managers_async does not invoke its callback.

One visible consequence of this is that the "Add Account" button in the Online Accounts panel does not present the corresponding dialog, if you are using the OSTree images.
Comment 1 Frederic Crozat 2014-03-17 13:49:37 UTC
This is problematic also on distributions which might not want to install any telepathy CM by default but still rely on gnome-online-accounts "add accounts" to work properly to setup Email accounts..
Comment 2 Guillaume Desmottes 2014-03-17 15:49:15 UTC
Created attachment 95948 [details] [review]
connection-manager: factor out all_cms_prepared()
Comment 3 Guillaume Desmottes 2014-03-17 15:49:26 UTC
Created attachment 95949 [details] [review]
tp_list_connection_managers_async: terminate properly if there is no CM
Comment 4 Simon McVittie 2014-03-17 16:12:55 UTC
Comment on attachment 95949 [details] [review]
tp_list_connection_managers_async: terminate properly if there is no CM

Review of attachment 95949 [details] [review]:
-----------------------------------------------------------------

Both patches look fine, apart from a minor bug in the regression test.

::: tests/dbus/list-cm-no-cm.c
@@ +66,5 @@
> +  GError *error = NULL;
> +
> +  /* This test relies on D-Bus not finding any service file so tweak
> +   * TP_TESTS_SERVICES_DIR to point to an empty directory. */
> +  dir = g_dir_make_tmp ("tp-glib-tests.XXXXXX", &error);

At the end, please save the result of tp_tests_run_with_bus(), g_rmdir() this directory, *then* exit with the saved result.
Comment 5 Guillaume Desmottes 2014-03-17 16:29:15 UTC
(In reply to comment #4)
> Comment on attachment 95949 [details] [review] [review]
> tp_list_connection_managers_async: terminate properly if there is no CM
> 
> Review of attachment 95949 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> Both patches look fine, apart from a minor bug in the regression test.
> 
> ::: tests/dbus/list-cm-no-cm.c
> @@ +66,5 @@
> > +  GError *error = NULL;
> > +
> > +  /* This test relies on D-Bus not finding any service file so tweak
> > +   * TP_TESTS_SERVICES_DIR to point to an empty directory. */
> > +  dir = g_dir_make_tmp ("tp-glib-tests.XXXXXX", &error);
> 
> At the end, please save the result of tp_tests_run_with_bus(), g_rmdir()
> this directory, *then* exit with the saved result.

I've done that and merged the branch.

Fixed for 0.23.3.


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.