mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-23 08:45:48 +08:00
Add command logging.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user