From 68b81086a459900fd185ac8460da5222636d2ef0 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Mon, 22 Mar 2021 22:18:59 +0000 Subject: [PATCH] Add VS2019 support. --- DMRGateway.vcxproj | 2 ++ DMRGateway.vcxproj.filters | 6 ++++++ RemoteControl.cpp | 6 +++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/DMRGateway.vcxproj b/DMRGateway.vcxproj index 6436d99..9276e93 100644 --- a/DMRGateway.vcxproj +++ b/DMRGateway.vcxproj @@ -177,6 +177,7 @@ + @@ -223,6 +224,7 @@ + diff --git a/DMRGateway.vcxproj.filters b/DMRGateway.vcxproj.filters index 3f9fdc3..66c48ee 100644 --- a/DMRGateway.vcxproj.filters +++ b/DMRGateway.vcxproj.filters @@ -146,6 +146,9 @@ Header Files + + Header Files + @@ -274,5 +277,8 @@ Source Files + + Source Files + \ No newline at end of file diff --git a/RemoteControl.cpp b/RemoteControl.cpp index 0d4ad07..3e495e9 100644 --- a/RemoteControl.cpp +++ b/RemoteControl.cpp @@ -111,9 +111,9 @@ REMOTE_COMMAND CRemoteControl::getCommand() } m_command = RCD_CONNECTION_STATUS; - } - else + } else { replyStr = "KO"; + } ::snprintf(buffer, BUFFER_LENGTH * 2, "%s remote command of \"%s\" received", ((m_command == RCD_NONE) ? "Invalid" : "Valid"), command); if (m_command == RCD_NONE) { @@ -123,7 +123,7 @@ REMOTE_COMMAND CRemoteControl::getCommand() LogMessage(buffer); } - m_socket.write((unsigned char*)replyStr.c_str(), replyStr.length(), address, addrlen); + m_socket.write((unsigned char*)replyStr.c_str(), (unsigned int)replyStr.length(), address, addrlen); } return m_command;