diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-05-20 14:43:05 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-05-20 14:43:05 +0200 |
commit | 00de2ba96ac248ddeef694ac2497a861e81f34dd (patch) | |
tree | e492e19a7d7c6c4ecfac59cab7fc64a727e9a0f9 | |
parent | 0c00be007c3a72928f6f8e167e8e6f2469f1a88d (diff) |
Fix 'observe' requests creation in the secure mode
As a result of the recent refactoring, the security mode was being
ignored when crating 'observe' requests. Added the missing parameter.
Change-Id: Ib24d68c6794700164274ef66e48aa758918f6c91
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/coap/qcoapclient.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/coap/qcoapclient.cpp b/src/coap/qcoapclient.cpp index dc02464..999c5ea 100644 --- a/src/coap/qcoapclient.cpp +++ b/src/coap/qcoapclient.cpp @@ -460,7 +460,10 @@ QCoapResourceDiscoveryReply *QCoapClient::discover(const QUrl &url, const QStrin */ QCoapReply *QCoapClient::observe(const QCoapRequest &request) { - QCoapRequest copyRequest = QCoapRequestPrivate::createRequest(request, QtCoap::Method::Get); + Q_D(QCoapClient); + + QCoapRequest copyRequest = QCoapRequestPrivate::createRequest(request, QtCoap::Method::Get, + d->connection->isSecure()); copyRequest.enableObserve(); return get(copyRequest); |