Skip to content

Commit

Permalink
address codesmell
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-du-car committed Apr 15, 2024
1 parent feafe16 commit ea41441
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/v2i-hub/CARMACloudPlugin/src/CARMACloudPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,9 @@ int CARMACloudPlugin::StartWebService()
quint16 port = static_cast<quint16>(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);

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/CARMACloudPlugin/src/CARMACloudPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down

0 comments on commit ea41441

Please sign in to comment.