Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #82 from tigeli/fixcrash
[connectionagent] do not crash if tethering interface disappears
  • Loading branch information
tigeli committed Aug 25, 2014
2 parents 057a9e4 + 35bce4f commit b5766ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions connd/qconnectionagent.cpp
Expand Up @@ -155,6 +155,7 @@ void QConnectionAgent::onErrorReported(const QString &servicePath, const QString
if (error == "connect-failed" && servicePath.contains("cellular") && netman->offlineMode())
return;

if (!tetheringWifiTech) return;
// Suppress errors when switching to tethering mode
if ((delayedTethering || tetheringWifiTech->tethering()) && servicePath.contains(QStringLiteral("wifi")))
return;
Expand Down Expand Up @@ -825,6 +826,8 @@ void QConnectionAgent::startTethering(const QString &type)
confFile.setValue("tetheringType",type);

delayedTethering = true;
tetheringWifiTech = tetherTech;

if (!techPowered) {
tetherTech->setPowered(true);
} else {
Expand Down

0 comments on commit b5766ab

Please sign in to comment.