Add command logging.

This commit is contained in:
Jonathan Naylor 2019-01-09 11:23:14 +00:00
parent d3a84ee707
commit 6f7c7e968e

View file

@ -64,12 +64,14 @@ int CRemoteCommand::send(const std::string& command)
in_addr address = CUDPSocket::lookup("localhost");
ret = socket.write((unsigned char* )command.c_str(), command.length(), address, m_port);
ret = socket.write((unsigned char*)command.c_str(), command.length(), address, m_port);
if (!ret) {
socket.close();
return 1;
}
LogMessage("Command sent: \"%s\" to port: %u", command.c_str(), m_port);
socket.close();
return 0;