Bug 91272 - [PATCH] Fix autoconnection of accounts with always_dispatch=true
Summary: [PATCH] Fix autoconnection of accounts with always_dispatch=true
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: mission-control (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-08 20:04 UTC by Martin Klapetek
Modified: 2019-07-08 19:28 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch (642 bytes, text/plain)
2015-07-08 20:04 UTC, Martin Klapetek
Details

Description Martin Klapetek 2015-07-08 20:04:57 UTC
Created attachment 117009 [details]
Patch

I'm using telepathy-ofono with its MC account plugin setting the ofono account up. The ofono account has always_dispatch set to true, however when autoconnecting on system startup where no network is available, the account will not connect and wait for network to come up.

While autoconnecting on MC startup, it gets all the way to "mcd_account_connection_proceed_with_reason" function where it fails the "mcd_connectivity_monitor_is_online" check in mcd-account-connection.c:103 for the account which then leads to the account being stuck in this state:

Presences:
   Automatic: available (2) ""
     Current: offline (1) ""
   Requested: available (2) ""
    Changing: yes

and from the Debug interface:

"mcd", 5, "mcd_account_connection_proceed_with_reason: ofono/ofono/account0 wants to connect, but we're offline; queuing it up"

...until there's a network connection. Once there is a network, everything works just fine.

However if I understand the purpose of always_dispatch=true correctly, it should ignore the network state and just connect.

So here's a simple patch which makes it work as expected. Now I'm not sure if this patch is correct as I don't know the MC code that well, but it does fix the issue of always_dispatch=true-account not being connected when there's no network.

This patch is against version 5.16.3.
Comment 1 Martin Klapetek 2015-12-01 15:20:01 UTC
Ping, can someone possibly have a look at this patch?


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.