| 1 | From c7dab526ed9672c4cce2e3784297a100f32493a4 Mon Sep 17 00:00:00 2001
|
|---|
| 2 | From: "Brian J. Murrell" <brian@interlinx.bc.ca>
|
|---|
| 3 | Date: Wed, 20 Jul 2016 07:35:42 -0400
|
|---|
| 4 | Subject: Warn the user if the database ping fails
|
|---|
| 5 |
|
|---|
| 6 | Since subsequent database operations will fail, but in a rather unobvious
|
|---|
| 7 | way.
|
|---|
| 8 |
|
|---|
| 9 | diff --git a/mythtv/libs/libmyth/mythcontext.cpp b/mythtv/libs/libmyth/mythcontext.cpp
|
|---|
| 10 | index 7a934b8..f8e5952 100644
|
|---|
| 11 | --- a/mythtv/libs/libmyth/mythcontext.cpp
|
|---|
| 12 | +++ b/mythtv/libs/libmyth/mythcontext.cpp
|
|---|
| 13 | @@ -696,6 +696,7 @@ QString MythContextPrivate::TestDBconnection(void)
|
|---|
| 14 |
|
|---|
| 15 | if (doPing && !ping(host, 3)) // Fail after trying for 3 seconds
|
|---|
| 16 | {
|
|---|
| 17 | + LOG(VB_GENERAL, LOG_WARN, QString("Pinging to %1 failed, database will be unavailable").arg(host));
|
|---|
| 18 | SilenceDBerrors();
|
|---|
| 19 | err = QObject::tr(
|
|---|
| 20 | "Cannot find (ping) database host %1 on the network",
|
|---|