Skip to content

Commit

Permalink
Add handling of MediaServer announce type to backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
wagnerrp committed Jul 5, 2011
1 parent 9768c2e commit fb63a2e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions mythtv/programs/mythbackend/mainserver.cpp
Expand Up @@ -1305,6 +1305,26 @@ void MainServer::HandleAnnounce(QStringList &slist, QStringList commands,
SendMythSystemEvent(QString("CLIENT_CONNECTED HOSTNAME %1")
.arg(commands[2]));
}
if (commands[1] == "MediaServer")
{
if (commands.size() < 3)
{
VERBOSE(VB_IMPORTANT, "Received malformed ANN MediaServer query");
errlist << "malformed_ann_query";
socket->writeStringList(errlist);
return;
}

PlaybackSock *pbs = new PlaybackSock(this, socket, commands[2],
kPBSEvents_Normal);
pbs->setBlockShutdown(false);
sockListLock.lockForWrite();
playbackList.push_back(pbs);
sockListLock.unlock();

SendMythSystemEvent(QString("CLIENT_CONNECTED HOSTNAME %1")
.arg(commands[2]));
}
else if (commands[1] == "SlaveBackend")
{
if (commands.size() < 4)
Expand Down

0 comments on commit fb63a2e

Please sign in to comment.