[PATCH] Skip network checks on always dispatchable accounts

Bug #1473011 reported by Martin Klapetek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Telepathy Mission Control 5
Fix Released
Medium
telepathy-mission-control-5 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

MissionControl does not seem to connect accounts that have always_dispatch=true attribute set; that attribute is meant to serve as "skip network connection checks when connecting"-kind of thing. After some investigation, I've found a possible bug and created a patch. I've posted this patch to upstream [1] but the general activity in the project has declined and so it might take quite some time before it's reviewed and put into a release.

Therefore I was advised to file a bug report here for a chance for this patch to be included as a distro patch. This would also help fix this issue in ubuntu-phone, where it is currently being workarounded[2].

The patch itself is located at [1] so I'm not going to reupload it here.

Cheers,
Martin

[1] - https://bugs.freedesktop.org/show_bug.cgi?id=91272
[2] - http://bazaar.launchpad.net/~phablet-team/telephony-service/trunk/view/head:/tools/ofono-setup#L39

Revision history for this message
In , Martin Klapetek (martin-klapetek) wrote :

Created attachment 117009
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.

Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

thanks for investigating this issue.

I can confirm this affects ubuntu phone. While the workaround in ofono-setup seems to work, this script is going away at some point as it is being replaced by a mission control plugin, therefore the patch proposed by Martin will be needed.
If that doesn't cause any regressions to ubuntu desktop, it would be good to get the patch included into the mission-control package while it's not applied upstream.

Revision history for this message
Martin Klapetek (martin-klapetek) wrote :

Glad I could help :)

Can we get some action on this one? Should I ping anybody for a review or a comment?

Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

I tested the patch and it works fine.
It is already in process of landing on ubuntu wily/vivid.
Thank you.

Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Sorry for the delay, the fix is currently being tested and should be available soon on Wily and on vivid stable phone overlay.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package telepathy-mission-control-5 - 1:5.16.3-1ubuntu4

---------------
telepathy-mission-control-5 (1:5.16.3-1ubuntu4) wily; urgency=medium

  * debian/patches/fix-1473011.patch
    - Fix autoconnection of accounts with always_dispatch=true (LP: #1473011)

 -- Ken VanDine <email address hidden> Mon, 27 Jul 2015 13:05:55 -0400

Changed in telepathy-mission-control-5 (Ubuntu):
status: New → Fix Released
Revision history for this message
Martin Klapetek (martin-klapetek) wrote :

Nice, thanks a lot!

Is there any chance this could be backported to vivid as well?

Revision history for this message
In , Martin Klapetek (martin-klapetek) wrote :

Ping, can someone possibly have a look at this patch?

Changed in mission-control-5:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Alexander Akulich (akulichalexander) wrote :
Changed in mission-control-5:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.