[SailfishDevel] Qt Network: "Network access is disabled" after network change

Lorn Potter lorn.potter at gmail.com
Tue May 2 23:46:36 UTC 2017



On 01/05/17 19:16, Slava Monich wrote:
> Basically, QNetworkAccessManager is sometimes stuck in NotAccessible
> state after switching from mobile data to wifi.

> My theory was that
> configurationChanged, onlineStateChanged and networkSessionStateChanged
> (queued) signals from the past were getting mixed with the current state
> (which was checked directly) in such a way that
> QNetworkAccessManagerPrivate online state remained false even though
> connman service was getting successfully connected.

This is all from memory, but...

The cell network 'disconnected' can come in after wifi has been
established, but before all wifi settings are available so QNAM
configuration cannot be 'active'. connman manager can send a 'services
updated' signal before the service object has actually been updated
internally. so the bearer plugin goes to check it and the properties of
that service are not yet updated.

and then, wpa/connman can also 'remove' an AP when it really is around,
even in the middle of connecting.

As well, connman's 'ready' and 'online' are both equivalent to
QNAMConfiguration::Active. 'ready' does not guarantee that internet can
be reached, and 'online' check can easily fail.


I am sure there are other intricacies I am forgetting, but the
interactions are quite complicated, so it's not an easy bug to fix.
Even if you remove the whole 'manually setting NetworkAccessible' to
notAccessible.


More information about the Devel mailing list