summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2019-02-28 00:51:51 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2019-03-20 00:27:28 +0000
commit58111f286fd66e3a4c538fdd558db268f6fa8053 (patch)
treeb211ddba3d49008bd2833f92c082c5442b21323b /network
parentdab35b40374d4f232b15b67d447639d96e057473 (diff)
libqtappfw: network: add invalidPassphrase signal
Report invalid passphrases to clients via a signal Bug-AGL: SPEC-2183 SPEC-2271 Change-Id: I98d34942427bf971663bac23a30be35aa2ae8dea Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> (cherry picked from commit dc5eea70949891012ddb7d37727955c30a2e74bb)
Diffstat (limited to 'network')
-rw-r--r--network/network.cpp4
-rw-r--r--network/network.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/network/network.cpp b/network/network.cpp
index db4b2b4..ebfa7a9 100644
--- a/network/network.cpp
+++ b/network/network.cpp
@@ -286,6 +286,10 @@ void Network::processReply(ResponseMessage *rmsg)
addServices(rmsg->replyData().value("values").toArray());
} else if (rmsg->requestVerb() == "technologies") {
parseTechnologies(rmsg->replyData().value("values").toArray());
+ } else if (rmsg->requestVerb() == "connect_service") {
+ if (rmsg->replyStatus() == "failed" && rmsg->replyInfo().contains("invalid-key")) {
+ emit invalidPassphrase(rmsg->requestData()["parameter"].toMap()["service"].toString());
+ }
}
}
diff --git a/network/network.h b/network/network.h
index 499f612..7d47ace 100644
--- a/network/network.h
+++ b/network/network.h
@@ -51,6 +51,7 @@ class Network : public QObject
signals:
void inputRequest(int id);
+ void invalidPassphrase(QString service);
void searchResults(QString name);
void statusChanged(bool connected);
void wifiConnectedChanged(bool connected);