Skip to content

Commit

Permalink
Merge pull request #74 from lpotter/master
Browse files Browse the repository at this point in the history
[connectionagent] disconnect mobile data if wifi becomes ready
  • Loading branch information
lpotter committed Jun 24, 2014
2 parents 77ec166 + 21182e3 commit bcaabd3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions connd/qconnectionagent.cpp
Expand Up @@ -249,6 +249,11 @@ void QConnectionAgent::serviceStateChanged(const QString &state)
if (delayedTethering && service->type() == "wifi" && state == "association") {
service->requestDisconnect();
}
if (state == "ready" && service->type() == "wifi"
&& !delayedTethering
&& netman->defaultRoute()->type() == "cellular") {
netman->defaultRoute()->requestDisconnect();
}
if (state == "online") {
Q_EMIT connectionState(state, service->type());

Expand Down

0 comments on commit bcaabd3

Please sign in to comment.