mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-24 01:25:41 +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");
|
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) {
|
if (!ret) {
|
||||||
socket.close();
|
socket.close();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LogMessage("Command sent: \"%s\" to port: %u", command.c_str(), m_port);
|
||||||
|
|
||||||
socket.close();
|
socket.close();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user