summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b>2005-03-05 13:08:04 +0000
committerwr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b>2005-03-05 13:08:04 +0000
commit738ef430f27a20e48240dbfeb9ddfce8fa1d9b1a (patch)
treee6edc7a3c1e2fb7abec5e7e556d01182cca67330
parent4b59b0193b21c7c6a289a20cebe0b0a6edbe244f (diff)
downloadvdr-plugin-muggle-738ef430f27a20e48240dbfeb9ddfce8fa1d9b1a.tar.gz
vdr-plugin-muggle-738ef430f27a20e48240dbfeb9ddfce8fa1d9b1a.tar.bz2
debug messages show if embedded server is used
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/branches/0.1.3-wr@537 e10066b5-e1e2-0310-b819-94efdf66514b
-rw-r--r--mg_mysql.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mg_mysql.c b/mg_mysql.c
index 4266c27..97287b2 100644
--- a/mg_mysql.c
+++ b/mg_mysql.c
@@ -452,6 +452,7 @@ mgmySql::Connect ()
m_db = mysql_init (0);
if (!m_db)
return;
+#ifdef HAVE_SERVER
bool success;
if (the_setup.DbSocket != NULL)
{
@@ -483,11 +484,17 @@ mgmySql::Connect ()
}
if (!success)
{
- mgWarning("Failed to connect to host '%s' as User '%s', Password '%s': Error: %s",
+ mgWarning("Failed to connect to server '%s' as User '%s', Password '%s': %s",
the_setup.DbHost,the_setup.DbUser,the_setup.DbPass,mysql_error(m_db));
mysql_close (m_db);
m_db = 0;
}
+#else
+ if (!mysql_real_connect(m_db, 0, 0, 0, 0, 0, 0, 0))
+ mgWarning("Failed to connect to embedded data base:%s ",mysql_error(m_db));
+ else
+ mgDebug(1,"Connected to embedded mysql");
+#endif
if (m_db)
{
mysql_query(m_db,"SHOW DATABASES");