Commit 31f3b4e9 authored by Aaron McCarthy's avatar Aaron McCarthy

[connectionagent] Suppress errors when enabling tethering.

Enabling tethering when wlan is not powered causes it to first be
powered on. Connman will initiate a scan and may attempt to connect to
a known network. The wifi technology will then be switched to tethering
mode causing any in progress wlan connection to abort with an error

As these error notifications are expected, suppress them.
parent 77ec1669
......@@ -153,10 +153,14 @@ void QConnectionAgent::onUserInputCanceled()
// from useragent
void QConnectionAgent::onErrorReported(const QString &servicePath, const QString &error)
if (error == "connect-failed"
&& (servicePath.contains("cellular") && netman->offlineMode())) {
// Suppress errors when switching to offline mode
if (error == "connect-failed" && servicePath.contains("cellular") && netman->offlineMode())
// Suppress errors when switching to tethering mode
if ((delayedTethering || tetheringWifiTech->tethering()) && servicePath.contains(QStringLiteral("wifi")))
qDebug() << "<<<<<<<<<<<<<<<<<<<<" << servicePath << error;
Q_EMIT errorReported(servicePath, error);
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