From 44146353a6783d93cd93f8ff2122fb47b7f01ebe Mon Sep 17 00:00:00 2001 From: Roland Rossgotterer Date: Thu, 19 Sep 2019 17:28:20 +0200 Subject: [PATCH] Fix ApiServerConnection::postNoResponse --- samples/afvclient/qml/main.qml | 4 ++-- src/blackcore/afv/clients/afvclient.cpp | 1 - src/blackcore/afv/connection/apiserverconnection.cpp | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/samples/afvclient/qml/main.qml b/samples/afvclient/qml/main.qml index c91be9d78..6e6bab3bf 100644 --- a/samples/afvclient/qml/main.qml +++ b/samples/afvclient/qml/main.qml @@ -176,7 +176,7 @@ ApplicationWindow { id: transceiver1 transceiverId: 0 onRxOnChanged: { - voiceClient.enableTransceiver(transceiverId, enabled) + voiceClient.enableTransceiver(transceiverId, rxOn) } } @@ -202,7 +202,7 @@ ApplicationWindow { transceiverId: 1 txOn: false onRxOnChanged: { - voiceClient.enableTransceiver(transceiverId, enabled) + voiceClient.enableTransceiver(transceiverId, rxOn) } } diff --git a/src/blackcore/afv/clients/afvclient.cpp b/src/blackcore/afv/clients/afvclient.cpp index 12483d54d..4fac19f47 100644 --- a/src/blackcore/afv/clients/afvclient.cpp +++ b/src/blackcore/afv/clients/afvclient.cpp @@ -221,7 +221,6 @@ namespace BlackCore transceiver.HeightAglM = height; transceiver.HeightMslM = height; } - updateTransceivers(); } void AFVClient::updateTransceivers() diff --git a/src/blackcore/afv/connection/apiserverconnection.cpp b/src/blackcore/afv/connection/apiserverconnection.cpp index 2398fd3f8..f7f774310 100644 --- a/src/blackcore/afv/connection/apiserverconnection.cpp +++ b/src/blackcore/afv/connection/apiserverconnection.cpp @@ -127,7 +127,6 @@ namespace BlackCore void ApiServerConnection::postNoResponse(const QString &resource, const QJsonDocument &json) { - Q_UNUSED(json); if (isShuttingDown()) { return; } // avoid crash if (! m_isAuthenticated) { @@ -147,7 +146,7 @@ namespace BlackCore QNetworkRequest request(url); request.setRawHeader("Authorization", "Bearer " + m_jwt); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); - QScopedPointer reply(nam->deleteResource(request)); + QScopedPointer reply(nam->post(request, json.toJson())); while (! reply->isFinished()) { loop.exec(); } qDebug() << "POST" << resource << "(" << m_watch.elapsed() << "ms)";