Skip to content

Commit a0c9d00

Browse files
committed
Move fix from 7866a61 into MythCoreContext.
This moves the GetMasterHostName fix from changeset 7866a61 into MythCoreContext, in the event this is the cause of other similar stalls in the backend protocol server. Refs #10265
1 parent 7866a61 commit a0c9d00

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

mythtv/libs/libmythbase/mythcorecontext.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -846,10 +846,16 @@ QString MythCoreContext::GetMasterHostName(void)
846846

847847
if (d->m_masterHostname.isEmpty())
848848
{
849-
QStringList strlist("QUERY_HOSTNAME");
850849

851-
if (SendReceiveStringList(strlist))
852-
d->m_masterHostname = strlist[0];
850+
if (IsMasterBackend())
851+
d->m_masterHostname = d->m_localHostname;
852+
else
853+
{
854+
QStringList strlist("QUERY_HOSTNAME");
855+
856+
if (SendReceiveStringList(strlist))
857+
d->m_masterHostname = strlist[0];
858+
}
853859
}
854860

855861
QString ret = d->m_masterHostname;

mythtv/libs/libmythmetadata/videoscan.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ VideoScannerThread::~VideoScannerThread()
9090

9191
void VideoScannerThread::SetDirs(QStringList dirs)
9292
{
93-
QString master = gCoreContext->IsMasterBackend() ?
94-
gCoreContext->GetHostName() :
95-
gCoreContext->GetMasterHostName();
93+
QString master = gCoreContext->GetMasterHostName();
9694
QStringList searchhosts, mdirs;
9795
m_offlineSGHosts.clear();
9896

0 commit comments

Comments
 (0)