summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael T. Dean <mdean@mythtv.org>2011-03-04 00:39:26 (GMT)
committer Michael T. Dean <mdean@mythtv.org>2011-03-04 00:39:26 (GMT)
commit889f53315d5f62f8c95c8805b2f5a57d9f694749 (patch)
tree3fb2b0078e1ee3313620909d7921da0584b07bef
parente8ca189ab4f99c63ddb58603124bd1d38f3c6369 (diff)
Don't allow remote mythbackends to upgrade database.
Only allow the mythbackend application running on the master backend host to upgrade the database. Upgrades can still be performed by mythtv-setup on any host (including master backend host, remote backend hosts, and dedicated mythfrontend hosts).
-rw-r--r--mythtv/programs/mythbackend/main_helpers.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/mythtv/programs/mythbackend/main_helpers.cpp b/mythtv/programs/mythbackend/main_helpers.cpp
index bca9d4f..a87cb8c 100644
--- a/mythtv/programs/mythbackend/main_helpers.cpp
+++ b/mythtv/programs/mythbackend/main_helpers.cpp
@@ -661,7 +661,9 @@ int run_backend(const MythCommandLineParser &cmdline)
if (!setup_context(cmdline))
return GENERIC_EXIT_NO_MYTHCONTEXT;
- if (!UpgradeTVDatabaseSchema(true, true))
+ bool ismaster = gCoreContext->IsMasterHost();
+
+ if (!UpgradeTVDatabaseSchema(ismaster, ismaster))
{
VERBOSE(VB_IMPORTANT, "Couldn't upgrade database to new schema");
return GENERIC_EXIT_DB_OUTOFDATE;
@@ -669,8 +671,6 @@ int run_backend(const MythCommandLineParser &cmdline)
///////////////////////////////////////////
- bool ismaster = gCoreContext->IsMasterHost();
-
g_pUPnp = new MediaServer(ismaster, !cmdline.IsUPnPEnabled() );
if (!ismaster)