AccessManager: don't set an invalid network configuration on linux (#5538)
authorOlivier Goffart <olivier@woboq.com>
Thu, 16 Feb 2017 15:14:55 +0000 (16:14 +0100)
committerMarkus Goetz <markus@woboq.com>
Thu, 16 Feb 2017 15:14:55 +0000 (16:14 +0100)
commita3f4907e0b6340c828602558605b59d0078dad7d
treea9087f883a33a5ff5c4c7d4ea36ed82d1d6d5283
parent4d7dd0c9093702f3deec014e15c5a31c59a64186
AccessManager: don't set an invalid network configuration on linux (#5538)

If we call
 setConfiguration(QNetworkConfiguration());
This sets an invalid configuration on the QNAM.
But later, when we really go online because interfaces are discovered,
QNetworkAccessManagerPrivate::_q_onlineStateChanged is called (with isOnline=true).
And this will set the state to disconnected because customNetworkConfiguration is
true, and the networkConfiguration state is disabled.

The workaround we to fix another bug on Windows in which the default network
configuration was not behaving properly.

The issue on linux is hard to reproduce and only happen in some condition,
but it was reproduced on smashbox when they run two owncloudcmd at the same time.

Issues: #4720 , #3600
src/libsync/accessmanager.cpp