Commit a38e153d authored by Lorn Potter's avatar Lorn Potter

[connectionagent] Do not send connectionRequest if there is a service

available that is auto connectable.

This fixes condition when changing from one tech to another and
there is a dns lookup error that causes a connectionRequest from
connman in the moment between connections.
parent 2147d2fd
......@@ -170,7 +170,15 @@ void QConnectionAgent::onConnectionRequest()
{
sendConnectReply("Suppress", 15);
qDebug() << flightModeSuppression;
if (!flightModeSuppression) {
bool okToRequest = true;
Q_FOREACH (const QString &path, servicesMap.keys()) {
qDebug() << "checking" <<servicesMap.value(path)->name() << servicesMap.value(path)->autoConnect();
if (servicesMap.value(path)->autoConnect()) {
okToRequest = false;
break;
}
}
if (!flightModeSuppression && okToRequest) {
Q_EMIT connectionRequest();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment