Add command logging.
This commit is contained in:
parent
d3a84ee707
commit
6f7c7e968e
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue