Add more log messages #57

develop
Geoffrey Merck 4 months ago
parent 65027aa937
commit 9fbfc00b36

@ -95,9 +95,9 @@ void CRemoteHandler::process()
RECONNECT reconnect; RECONNECT reconnect;
m_handler.readLink(callsign, reconnect, reflector); m_handler.readLink(callsign, reconnect, reflector);
if (reflector.empty()) if (reflector.empty())
CLog::logInfo("Remote control user has linked \"%s\" to \"None\" with reconnect %d", callsign.c_str(), int(reconnect)); CLog::logInfo("Remote control user requesting link \"%s\" to \"None\" with reconnect %d", callsign.c_str(), int(reconnect));
else else
CLog::logInfo("Remote control user has linked \"%s\" to \"%s\" with reconnect %d", callsign.c_str(), reflector.c_str(), int(reconnect)); CLog::logInfo("Remote control user requesting link \"%s\" to \"%s\" with reconnect %d", callsign.c_str(), reflector.c_str(), int(reconnect));
link(callsign, reconnect, reflector, true); link(callsign, reconnect, reflector, true);
} }
break; break;
@ -105,7 +105,7 @@ void CRemoteHandler::process()
std::string callsign, reflector; std::string callsign, reflector;
PROTOCOL protocol; PROTOCOL protocol;
m_handler.readUnlink(callsign, protocol, reflector); m_handler.readUnlink(callsign, protocol, reflector);
CLog::logInfo("Remote control user has unlinked \"%s\" from \"%s\" for protocol %d", callsign.c_str(), reflector.c_str(), int(protocol)); CLog::logInfo("Remote control user requesting unlink \"%s\" from \"%s\" for protocol %d", callsign.c_str(), reflector.c_str(), int(protocol));
unlink(callsign, protocol, reflector); unlink(callsign, protocol, reflector);
} }
break; break;
@ -114,9 +114,9 @@ void CRemoteHandler::process()
RECONNECT reconnect; RECONNECT reconnect;
m_handler.readLinkScr(callsign, reconnect, reflector); m_handler.readLinkScr(callsign, reconnect, reflector);
if (reflector.empty()) if (reflector.empty())
CLog::logInfo("Remote control user has linked \"%s\" to \"None\" with reconnect %d from localhost", callsign.c_str(), reconnect); CLog::logInfo("Remote control user requesting link \"%s\" to \"None\" with reconnect %d from localhost", callsign.c_str(), reconnect);
else else
CLog::logInfo("Remote control user has linked \"%s\" to \"%s\" with reconnect %d from localhost", callsign.c_str(), reflector.c_str(), reconnect); CLog::logInfo("Remote control user requesting link \"%s\" to \"%s\" with reconnect %d from localhost", callsign.c_str(), reflector.c_str(), reconnect);
link(callsign, reconnect, reflector, false); link(callsign, reconnect, reflector, false);
} }
break; break;
@ -155,6 +155,7 @@ void CRemoteHandler::sendRepeater(const std::string& callsign)
{ {
CRepeaterHandler* repeater = CRepeaterHandler::findDVRepeater(callsign); CRepeaterHandler* repeater = CRepeaterHandler::findDVRepeater(callsign);
if (repeater == NULL) { if (repeater == NULL) {
CLog::logInfo("Remote requesting invalid repeater \"%s\"", callsign.c_str());
m_handler.sendNAK("Invalid repeater callsign"); m_handler.sendNAK("Invalid repeater callsign");
return; return;
} }
@ -195,6 +196,7 @@ void CRemoteHandler::link(const std::string& callsign, RECONNECT reconnect, cons
{ {
CRepeaterHandler* repeater = CRepeaterHandler::findDVRepeater(callsign); CRepeaterHandler* repeater = CRepeaterHandler::findDVRepeater(callsign);
if (repeater == NULL) { if (repeater == NULL) {
CLog::logInfo("Remote requesting link for invalid repeater \"%s\"", callsign.c_str());
m_handler.sendNAK("Invalid repeater callsign"); m_handler.sendNAK("Invalid repeater callsign");
return; return;
} }
@ -209,6 +211,7 @@ void CRemoteHandler::unlink(const std::string& callsign, PROTOCOL protocol, cons
{ {
CRepeaterHandler* repeater = CRepeaterHandler::findDVRepeater(callsign); CRepeaterHandler* repeater = CRepeaterHandler::findDVRepeater(callsign);
if (repeater == NULL) { if (repeater == NULL) {
CLog::logInfo("Remote requesting unlink for invalid repeater \"%s\"", callsign.c_str());
m_handler.sendNAK("Invalid repeater callsign"); m_handler.sendNAK("Invalid repeater callsign");
return; return;
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.