Skip to content

Commit

Permalink
Merge pull request #75 from amccarthy/master
Browse files Browse the repository at this point in the history
[connectionagent] Suppress errors when enabling tethering.
  • Loading branch information
Aaron McCarthy committed Jun 25, 2014
2 parents ae5f9f4 + 31f3b4e commit 7ce614d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions connd/qconnectionagent.cpp
Expand Up @@ -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())) {
return;
}
// Suppress errors when switching to offline mode
if (error == "connect-failed" && servicePath.contains("cellular") && netman->offlineMode())
return;

// Suppress errors when switching to tethering mode
if ((delayedTethering || tetheringWifiTech->tethering()) && servicePath.contains(QStringLiteral("wifi")))
return;

qDebug() << "<<<<<<<<<<<<<<<<<<<<" << servicePath << error;
Q_EMIT errorReported(servicePath, error);
}
Expand Down

0 comments on commit 7ce614d

Please sign in to comment.