summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Pinkham <cpinkham@mythtv.org>2011-01-30 04:50:35 (GMT)
committer Chris Pinkham <cpinkham@mythtv.org>2011-01-30 04:50:35 (GMT)
commit946f6ccbfe8d31bc7146fffe38d4eca18a9766ae (patch)
tree345cb86b12f5efb54330518ade577a998e6a48ac
parentb5c3d232ab8cee647ee0cf10bbdae53cb2f35b5e (diff)
Don't cache bad result in MythCoreContext::GetMasterHostName().
In MythCoreContext::GetMasterHostName(), don't cache the result value if SendReceiveStringList() fails.
-rw-r--r--mythtv/libs/libmythbase/mythcorecontext.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/mythtv/libs/libmythbase/mythcorecontext.cpp b/mythtv/libs/libmythbase/mythcorecontext.cpp
index c64d8c6..50fb381 100644
--- a/mythtv/libs/libmythbase/mythcorecontext.cpp
+++ b/mythtv/libs/libmythbase/mythcorecontext.cpp
@@ -615,9 +615,8 @@ QString MythCoreContext::GetMasterHostName(void)
{
QStringList strlist("QUERY_HOSTNAME");
- SendReceiveStringList(strlist);
-
- d->m_masterHostname = strlist[0];
+ if (SendReceiveStringList(strlist))
+ d->m_masterHostname = strlist[0];
}
QString ret = d->m_masterHostname;