Skip to content

Commit 132f6f5

Browse files
committed
[localcontroller] Triggers a request timeout when a request cannot be forward to the Central System or to the Charge Point
1 parent 0948167 commit 132f6f5

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

src/localcontroller/centralsystem/CentralSystemHandler.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,6 @@ class CentralSystemHandler
415415
if (cs_error.empty())
416416
{
417417
LOG_WARNING << "[" << m_identifier << "] - Unable to forward [" << action << "] request";
418-
error = ocpp::rpc::IRpc::RPC_ERROR_INTERNAL;
419418
}
420419
else
421420
{
@@ -428,7 +427,6 @@ class CentralSystemHandler
428427
else
429428
{
430429
LOG_WARNING << "[" << m_identifier << "] - Unable to forward [" << action << "] request";
431-
error = ocpp::rpc::IRpc::RPC_ERROR_INTERNAL;
432430
}
433431

434432
return ret;

src/localcontroller/centralsystem/CentralSystemProxy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ void CentralSystemProxy::rcpMessageReceived(const std::string& msg)
563563
/** @copydoc void IRpc::ISpy::rcpMessageSent(const std::string& msg) */
564564
void CentralSystemProxy::rcpMessageSent(const std::string& msg)
565565
{
566-
LOG_COM << "[" << m_identifier << "] - RX : " << msg;
566+
LOG_COM << "[" << m_identifier << "] - TX : " << msg;
567567
}
568568

569569
// RpcClient::IListener interface

src/localcontroller/chargepoint/ChargePointHandler.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ class ChargePointHandler
266266
if (cs_error.empty())
267267
{
268268
LOG_WARNING << "[" << m_identifier << "] - Unable to forward [" << action << "] request";
269-
error = ocpp::rpc::IRpc::RPC_ERROR_INTERNAL;
270269
}
271270
else
272271
{

src/rpc/RpcBase.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,11 +415,10 @@ void RpcBase::rxThread()
415415
else
416416
{
417417
// Error
418-
if (error_code.empty())
418+
if (!error_code.empty())
419419
{
420-
error_code = RPC_ERROR_GENERIC;
420+
sendCallError(rpc_message->unique_id, error_code.c_str(), error);
421421
}
422-
sendCallError(rpc_message->unique_id, error_code.c_str(), error);
423422
}
424423

425424
// Free resources

0 commit comments

Comments
 (0)