summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Pinkham <cpinkham@mythtv.org>2011-01-30 04:57:08 (GMT)
committer Chris Pinkham <cpinkham@mythtv.org>2011-01-30 04:57:08 (GMT)
commit38938b305171831e4ba8472fafb106cdc6f81d80 (patch)
tree7de07188fcc06d9ad1e59e99d19bc08b6eb92276
parent06c8142bca34d8d8dc8f804c69f56befe1cce8ad (diff)
Don't cache bad result in MythCoreContext::GetMasterHostName().
In MythCoreContext::GetMasterHostName(), don't cache the result value if SendReceiveStringList() fails. (cherry picked from commit 946f6ccbfe8d31bc7146fffe38d4eca18a9766ae)
-rw-r--r--mythtv/libs/libmythdb/mythcorecontext.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/mythtv/libs/libmythdb/mythcorecontext.cpp b/mythtv/libs/libmythdb/mythcorecontext.cpp
index 2fddd08..621b3cc 100644
--- a/mythtv/libs/libmythdb/mythcorecontext.cpp
+++ b/mythtv/libs/libmythdb/mythcorecontext.cpp
@@ -613,9 +613,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;