Skip to content

Commit

Permalink
Print the incorrect protocol token on invalid connections.
Browse files Browse the repository at this point in the history
  • Loading branch information
gigem committed Aug 21, 2015
1 parent e1d4e64 commit 4b10c07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions mythtv/libs/libmythprotoserver/mythsocketmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,9 @@ void MythSocketManager::HandleVersion(MythSocket *socket,
QString token = slist[2];
if (token != MYTH_PROTO_TOKEN)
{
LOG(VB_GENERAL, LOG_ERR, LOC + "Client sent incorrect protocol token "
"for protocol version. Refusing connection!");
LOG(VB_GENERAL, LOG_ERR, LOC +
QString("Client sent incorrect protocol token \"%1\" for "
"protocol version. Refusing connection!").arg(token));
retlist << "REJECT" << MYTH_PROTO_VERSION;
socket->WriteStringList(retlist);
HandleDone(socket);
Expand Down
5 changes: 3 additions & 2 deletions mythtv/programs/mythbackend/mainserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1568,8 +1568,9 @@ void MainServer::HandleVersion(MythSocket *socket, const QStringList &slist)
if (token != MYTH_PROTO_TOKEN)
{
LOG(VB_GENERAL, LOG_CRIT, LOC +
"MainServer::HandleVersion - Client sent incorrect protocol"
" token for protocol version. Refusing connection!");
QString("MainServer::HandleVersion - Client sent incorrect "
"protocol token \"%1\" for protocol version. Refusing "
"connection!").arg(token));
retlist << "REJECT" << MYTH_PROTO_VERSION;
socket->WriteStringList(retlist);
HandleDone(socket);
Expand Down

0 comments on commit 4b10c07

Please sign in to comment.