diff --git a/src/v2i-hub/CARMACloudPlugin/src/CARMACloudPlugin.cpp b/src/v2i-hub/CARMACloudPlugin/src/CARMACloudPlugin.cpp index 1e723b20e..d2110c575 100644 --- a/src/v2i-hub/CARMACloudPlugin/src/CARMACloudPlugin.cpp +++ b/src/v2i-hub/CARMACloudPlugin/src/CARMACloudPlugin.cpp @@ -464,9 +464,9 @@ int CARMACloudPlugin::StartWebService() quint16 port = static_cast(webport); QHttpEngine::QObjectHandler apiHandler; - apiHandler.registerMethod(TCM_REPLY, [&](QHttpEngine::Socket *socket) + apiHandler.registerMethod(TCM_REPLY, [this](QHttpEngine::Socket *socket) { - CARMAResponseHandler(socket); + this->CARMAResponseHandler(socket); socket->close(); }); QHttpEngine::Server server(&apiHandler); diff --git a/src/v2i-hub/CARMACloudPlugin/src/CARMACloudPlugin.h b/src/v2i-hub/CARMACloudPlugin/src/CARMACloudPlugin.h index 6384aa627..9a9d85061 100644 --- a/src/v2i-hub/CARMACloudPlugin/src/CARMACloudPlugin.h +++ b/src/v2i-hub/CARMACloudPlugin/src/CARMACloudPlugin.h @@ -100,6 +100,7 @@ class CARMACloudPlugin: public PluginClient { uint16_t webport; std::string webip; uint16_t fetchtime; + void CARMAResponseHandler(QHttpEngine::Socket *socket); protected: void UpdateConfigSettings(); @@ -110,7 +111,6 @@ class CARMACloudPlugin: public PluginClient { void OnStateChange(IvpPluginState state); int StartWebService(); - void CARMAResponseHandler(QHttpEngine::Socket *socket); int CloudSend(const string& msg,const string& url, const string& base, const string& method); //Send HTTP request async void CloudSendAsync(const string& msg,const string& url, const string& base, const string& method);