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.
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_connectivi ty_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.