[mythtv] Changeset [14771] "Reduce excessive re-parsing of database settings" brakes backend
Nigel Pearson
nigel at ind.tansu.com.au
Tue Oct 30 21:38:04 UTC 2007
Sorry I broke it for you, Otto.
> I have setup where I have one master backend, myth-setup has the
> real IP
> of the machine in those two places where IP address is set. mysql.txt
> has the line "LocalHostName" commented away and DBHostName is set to
> localhost.
>
> Please ask if more info is needed..
Here is a debug patch. Could I get you to apply it
to libs/libmyth/mythcontext.cpp, and then send me
the first 20 lines of output from starting both
mythbackend and mythfrontend?
Index: mythcontext.cpp
===================================================================
--- mythcontext.cpp (revision 14771)
+++ mythcontext.cpp (working copy)
@@ -190,6 +190,25 @@
}
}
+static void PrintDatabaseParams(const DatabaseParams *params)
+{
+ cerr << "Database settings: " << params->dbUserName << "@"
+ << (params->dbHostName.length() ? params->dbHostName : "null")
+ << ":" << params->dbPort <<
+ " passwd '" << params->dbPassword <<
+ "', dbName " << params->dbName <<
+ ", dbType " << params->dbType << endl;
+
+ if (params->localEnabled)
+ cerr << "Local host name : " << params->localHostName << endl;
+
+ if (params->wolEnabled)
+ cerr << "Wake On LAN : " <<
+ "reconnect " << params->wolReconnect <<
+ "s, retry " << params->wolRetry <<
+ ", command '" << params->wolCommand << "'" << endl;
+}
+
class MythContextPrivate
{
public:
@@ -516,6 +535,7 @@
if (!LoadDatabaseSettings(pParams))
return false;
+PrintDatabaseParams(&m_DBparams);
// Attempt to connect to the database, get message for user if
it failed.
QString failure = TestDBconnection();
@@ -526,6 +546,7 @@
VERBOSE(VB_IMPORTANT, failure);
if (PromptForDatabaseParams(failure))
{
+PrintDatabaseParams(&m_DBparams);
failure = TestDBconnection();
if (failure.length())
VERBOSE(VB_IMPORTANT, failure);
@@ -663,6 +684,7 @@
// Even if we have loaded the settings file, it may be incomplete,
// so we check for missing values and warn user
FindSettingsProbs();
+PrintDatabaseParams(&m_DBparams);
m_localhostname = m_DBparams.localHostName;
if (m_localhostname == NULL ||
@@ -676,7 +698,9 @@
return false;
}
m_localhostname = localhostname;
+VERBOSE(VB_IMPORTANT, "Empty LocalHostName.");
}
+VERBOSE(VB_IMPORTANT, "Using localhost value of " + m_localhostname);
return true;
}
--
Nigel Pearson, nigel at ind.tansu.com.au|"Look at this!
Telstra Net. Eng., Sydney, Australia | Do you think I put this in
Office: 9202 3900 Fax: 9261 3912 | to get better reception?"
Mobile: 0408 664435 Home: 9792 6998 | Batty - Fern Gully
More information about the mythtv-dev
mailing list