From 095569906b35c5ce9331e13ac0cd0ccfeec20a9d Mon Sep 17 00:00:00 2001
From: Richard <peper03@yahoo.com>
Date: Wed, 14 Nov 2012 23:45:39 +0100
Subject: Calling GetMasterHostPrefix now always causes a connection to be
made to the master server, even if it's on the same host.
---
mythtv/libs/libmythbase/mythcorecontext.cpp | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/mythtv/libs/libmythbase/mythcorecontext.cpp b/mythtv/libs/libmythbase/mythcorecontext.cpp
index f267853..fc6b5f4 100644
a
|
b
|
QString MythCoreContext::GetMasterHostPrefix(const QString &storageGroup, |
703 | 703 | { |
704 | 704 | QString ret; |
705 | 705 | |
| 706 | // Ensure we always create a connection to the master server |
| 707 | // even if it's local |
| 708 | QMutexLocker locker(&d->m_sockLock); |
| 709 | if (!d->m_serverSock) |
| 710 | { |
| 711 | bool blockingClient = GetNumSetting("idleTimeoutSecs",0) > 0; |
| 712 | ConnectToMasterServer(blockingClient); |
| 713 | } |
| 714 | |
706 | 715 | if (IsMasterHost()) |
707 | 716 | { |
708 | 717 | return GenMythURL(GetSetting("MasterServerIP"), |
… |
… |
QString MythCoreContext::GetMasterHostPrefix(const QString &storageGroup, |
711 | 720 | storageGroup); |
712 | 721 | } |
713 | 722 | |
714 | | QMutexLocker locker(&d->m_sockLock); |
715 | | if (!d->m_serverSock) |
716 | | { |
717 | | bool blockingClient = GetNumSetting("idleTimeoutSecs",0) > 0; |
718 | | ConnectToMasterServer(blockingClient); |
719 | | } |
720 | | |
721 | 723 | if (d->m_serverSock) |
722 | 724 | { |
723 | 725 | |