Use dynamic app name for remote proxy connection
This commit is contained in:
parent
d96571a5a9
commit
5e84cb09f8
@ -948,7 +948,7 @@ bool AWSClient::postToMQTT(const QString &coreId, const QString &nonce, QObject*
|
|||||||
connect(reply, &QNetworkReply::finished, this, [reply, senderWatcher, callback]() {
|
connect(reply, &QNetworkReply::finished, this, [reply, senderWatcher, callback]() {
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
QByteArray data = reply->readAll();
|
QByteArray data = reply->readAll();
|
||||||
// qDebug() << "MQTT post reply" << data;
|
qCDebug(dcCloud()) << "MQTT post reply" << data;
|
||||||
if (senderWatcher.isNull()) {
|
if (senderWatcher.isNull()) {
|
||||||
qCDebug(dcCloud()) << "Request object disappeared. Discarding MQTT reply...";
|
qCDebug(dcCloud()) << "Request object disappeared. Discarding MQTT reply...";
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -36,6 +36,7 @@
|
|||||||
#include <QUrlQuery>
|
#include <QUrlQuery>
|
||||||
#include <QHostInfo>
|
#include <QHostInfo>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
#include <QCoreApplication>
|
||||||
|
|
||||||
using namespace remoteproxyclient;
|
using namespace remoteproxyclient;
|
||||||
|
|
||||||
@ -43,7 +44,7 @@ CloudTransport::CloudTransport(AWSClient *awsClient, QObject *parent):
|
|||||||
NymeaTransportInterface(parent),
|
NymeaTransportInterface(parent),
|
||||||
m_awsClient(awsClient)
|
m_awsClient(awsClient)
|
||||||
{
|
{
|
||||||
m_remoteproxyConnection = new RemoteProxyConnection(QUuid::createUuid(), "nymea:app", this);
|
m_remoteproxyConnection = new RemoteProxyConnection(QUuid::createUuid(), qApp->applicationName(), this);
|
||||||
|
|
||||||
QObject::connect(m_remoteproxyConnection, &RemoteProxyConnection::remoteConnectionEstablished, this,[this]() {
|
QObject::connect(m_remoteproxyConnection, &RemoteProxyConnection::remoteConnectionEstablished, this,[this]() {
|
||||||
qDebug() << "CloudTransport: Remote connection established.";
|
qDebug() << "CloudTransport: Remote connection established.";
|
||||||
|
|||||||
@ -289,6 +289,7 @@ void NymeaConnection::onConnected()
|
|||||||
void NymeaConnection::onDisconnected()
|
void NymeaConnection::onDisconnected()
|
||||||
{
|
{
|
||||||
NymeaTransportInterface* t = qobject_cast<NymeaTransportInterface*>(sender());
|
NymeaTransportInterface* t = qobject_cast<NymeaTransportInterface*>(sender());
|
||||||
|
qCInfo(dcNymeaConnection()) << "Disconnected from" << t->url().toString();
|
||||||
if (m_currentTransport != t) {
|
if (m_currentTransport != t) {
|
||||||
qCDebug(dcNymeaConnection()) << "An inactive transport for url" << t->url() << "disconnected... Cleaning up...";
|
qCDebug(dcNymeaConnection()) << "An inactive transport for url" << t->url() << "disconnected... Cleaning up...";
|
||||||
if (m_transportCandidates.contains(t)) {
|
if (m_transportCandidates.contains(t)) {
|
||||||
|
|||||||
@ -394,7 +394,7 @@ void ThingManager::editThingResponse(int commandId, const QVariantMap ¶ms)
|
|||||||
|
|
||||||
void ThingManager::executeActionResponse(int commandId, const QVariantMap ¶ms)
|
void ThingManager::executeActionResponse(int commandId, const QVariantMap ¶ms)
|
||||||
{
|
{
|
||||||
qDebug() << "Execute Action response" << params;
|
qCDebug(dcThingManager()) << "Execute Action response" << params;
|
||||||
emit executeActionReply(commandId, errorFromString(params.value("thingError").toByteArray()), params.value("displayMessage").toString());
|
emit executeActionReply(commandId, errorFromString(params.value("thingError").toByteArray()), params.value("displayMessage").toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -536,6 +536,7 @@ int ThingManager::executeAction(const QUuid &thingId, const QUuid &actionTypeId,
|
|||||||
p.insert("params", params);
|
p.insert("params", params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qCDebug(dcThingManager()) << "Executing action" << thingId << actionTypeId;
|
||||||
return m_jsonClient->sendCommand("Integrations.ExecuteAction", p, this, "executeActionResponse");
|
return m_jsonClient->sendCommand("Integrations.ExecuteAction", p, this, "executeActionResponse");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user