Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix issue when new AP's are seen
  • Loading branch information
Lorn Potter committed Apr 20, 2013
1 parent 27df350 commit ceca452
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
23 changes: 10 additions & 13 deletions connd/qconnectionmanager.cpp
Expand Up @@ -102,7 +102,6 @@ QConnectionManager::QConnectionManager(QObject *parent) :
// let me control autoconnect
netman->setSessionMode(true);


}

QConnectionManager::~QConnectionManager()
Expand Down Expand Up @@ -142,6 +141,7 @@ void QConnectionManager::onErrorReported(const QString &error)
// from useragent
void QConnectionManager::onConnectionRequest()
{
sendConnectReply("Suppress", 15);
if (!autoConnect()) {
Q_EMIT connectionRequest();
}
Expand All @@ -163,9 +163,8 @@ void QConnectionManager::onServiceAdded(const QString &servicePath)
updateServicesMap();
}

if (okToConnect && !currentType.isEmpty()) {
if (servicesMap.contains(servicePath)
&& servicesMap.value(servicePath)->type() == currentType
if (okToConnect && !currentType.isEmpty() && servicesMap.contains(servicePath)) {
if (servicesMap.value(servicePath)->type() == currentType
&& servicesMap.value(servicePath)->favorite()
&& !servicesMap.value(servicePath)->roaming()) {
connectToNetworkService(servicePath);
Expand All @@ -175,14 +174,15 @@ void QConnectionManager::onServiceAdded(const QString &servicePath)
}
}
//automigrate
if (servicesMap.value(servicePath)->autoConnect()) {
connectionHandover(connectedServices.isEmpty() ? QString() : connectedServices.at(0)
,findBestConnectableService());

if (servicesMap.contains(servicePath)) {
if (servicesMap.value(servicePath)->autoConnect()) {
connectionHandover(connectedServices.isEmpty() ? QString() : connectedServices.at(0)
,findBestConnectableService());
}
}
}

void QConnectionManager::onServiceRemoved(const QString &servicePath)
void QConnectionManager::onServiceRemoved(const QString &/*servicePath*/)
{
updateServicesMap();
}
Expand Down Expand Up @@ -288,7 +288,6 @@ void QConnectionManager::connectToType(const QString &type)
bool needConfig = false;

Q_FOREACH (const QString path, servicesList) {

if (servicesMap.contains(path) && servicesMap.value(path)->favorite()) {
connectToNetworkService(path);
needConfig = false;
Expand All @@ -297,7 +296,6 @@ void QConnectionManager::connectToType(const QString &type)
needConfig = true;
}
}

if (needConfig) {
Q_EMIT configurationNeeded(type);
serviceConnect = false;
Expand Down Expand Up @@ -392,9 +390,8 @@ void QConnectionManager::networkStateChanged(const QString &state)
}
}

void QConnectionManager::onServiceStrengthChanged(uint level)
void QConnectionManager::onServiceStrengthChanged(uint /*level*/)
{
NetworkService *service = qobject_cast<NetworkService *>(sender());
}

bool QConnectionManager::askRoaming() const
Expand Down
5 changes: 4 additions & 1 deletion rpm/connectionagent.changes
@@ -1,4 +1,7 @@
* Fri Apr 19 2013 Lorn Potter <lorn.potter@jollamobile.co> - 0.5.8
* Sun 21 APr 2013 Lorn Potter <lorn.potter@jollamobile.com> - 0.5.9
- fix issue when new AP's are seen

* Fri Apr 19 2013 Lorn Potter <lorn.potter@jollamobile.com> - 0.5.8
- fix autonnection when there is no preferred tech in conf

* Wed Apr 17 2013 Lorn Potter <lorn.potter@jollamobile.com> - 0.5.7
Expand Down

0 comments on commit ceca452

Please sign in to comment.