summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY.h12
-rw-r--r--lib/db.c8
-rw-r--r--lib/db.h2
-rwxr-xr-xscripts/epgd-conflictsof3
-rwxr-xr-xscripts/epgd-showdones1
-rwxr-xr-xscripts/epgd-showmerge2
-rwxr-xr-xscripts/epgd-showtimer2
-rwxr-xr-xscripts/epgd-showtimerat3
-rw-r--r--update.c3
9 files changed, 29 insertions, 7 deletions
diff --git a/HISTORY.h b/HISTORY.h
index 4ca74a0..71644a9 100644
--- a/HISTORY.h
+++ b/HISTORY.h
@@ -4,8 +4,8 @@
* -----------------------------------
*/
-#define _VERSION "1.1.140"
-#define VERSION_DATE "21.04.2018"
+#define _VERSION "1.1.141"
+#define VERSION_DATE "14.05.2018"
#define DB_API 7
#ifdef GIT_REV
@@ -18,9 +18,13 @@
* ------------------------------------
*
+2018-05-14: version 1.1.141 (horchi)
+ added: Compatibility for newer MariaBD librarys (patch by provided by marco)
+ added: execution shell to scripts
+
2018-04-21: version 1.1.140 (rechner)
- change: Added UI for Prepared search timer filter by channel number
-
+ change: Added UI for Prepared search timer filter by channel number
+
2018-04-18: version 1.1.139 (horchi)
change: Prepared search timer filter by channel number (to be added to WEBIF)
diff --git a/lib/db.c b/lib/db.c
index 2dbca80..7c3b57c 100644
--- a/lib/db.c
+++ b/lib/db.c
@@ -1376,11 +1376,19 @@ int cDbConnection::errorSql(cDbConnection* connection, const char* prefix,
if (error == CR_SERVER_LOST ||
error == CR_SERVER_GONE_ERROR ||
+// for compatibility with newer versions of MariaBD library
+#ifdef CR_INVALID_CONN_HANDLE
error == CR_INVALID_CONN_HANDLE ||
+#endif
error == CR_COMMANDS_OUT_OF_SYNC ||
error == CR_SERVER_LOST_EXTENDED ||
error == CR_STMT_CLOSED ||
+// for compatibility with newer versions of MariaBD library
+#ifdef CR_CONN_UNKNOW_PROTOCOL
error == CR_CONN_UNKNOW_PROTOCOL ||
+#else
+ error == CR_CONN_UNKNOWN_PROTOCOL ||
+#endif
error == CR_UNSUPPORTED_PARAM_TYPE ||
error == CR_NO_PREPARE_STMT ||
error == CR_SERVER_HANDSHAKE_ERR ||
diff --git a/lib/db.h b/lib/db.h
index efb5ebf..6d22810 100644
--- a/lib/db.h
+++ b/lib/db.h
@@ -1296,7 +1296,7 @@ class cDbProcedure : public cDbService
int created()
{
if (!connection || !connection->getMySql())
- return fail;
+ return no;
cDbStatement stmt(connection);
diff --git a/scripts/epgd-conflictsof b/scripts/epgd-conflictsof
index e753b30..e21c47f 100755
--- a/scripts/epgd-conflictsof
+++ b/scripts/epgd-conflictsof
@@ -1,3 +1,4 @@
+#!/bin/bash
export MYSQL_PWD=epg
@@ -28,4 +29,4 @@ select t.id, SUBSTRING_INDEX(t.channelid, '-', 3) as transponder, v.name as vdr,
and t.day + t.endtime div 100 * 60 * 60 + t.endtime % 100 * 60 <= ti.day + ti.endtime div 100 * 60 * 60 + ti.endtime % 100 * 60) \
) \
and t.vdruuid = ti.vdruuid \
- order by t.day, start;"
+ order by t.day, start;"
diff --git a/scripts/epgd-showdones b/scripts/epgd-showdones
index 13dad7d..86cd7b4 100755
--- a/scripts/epgd-showdones
+++ b/scripts/epgd-showdones
@@ -1,3 +1,4 @@
+#!/bin/bash
export MYSQL_PWD=epg
diff --git a/scripts/epgd-showmerge b/scripts/epgd-showmerge
index 5c4fee2..5f06f71 100755
--- a/scripts/epgd-showmerge
+++ b/scripts/epgd-showmerge
@@ -1,3 +1,5 @@
+#!/bin/bash
+
export MYSQL_PWD=epg
if [ "$1" == "-h" ]; then
diff --git a/scripts/epgd-showtimer b/scripts/epgd-showtimer
index be18de6..5425caf 100755
--- a/scripts/epgd-showtimer
+++ b/scripts/epgd-showtimer
@@ -1,3 +1,5 @@
+#!/bin/bash
+
export MYSQL_PWD=epg
if [ -z $1 ]; then
diff --git a/scripts/epgd-showtimerat b/scripts/epgd-showtimerat
index de1d8f3..bdc6d1d 100755
--- a/scripts/epgd-showtimerat
+++ b/scripts/epgd-showtimerat
@@ -1,3 +1,4 @@
+#!/bin/bash
export MYSQL_PWD=epg
@@ -11,4 +12,4 @@ select t.id, SUBSTRING_INDEX(t.channelid, '-', 3) as transponder, v.name, t.sour
v.uuid = t.vdruuid and t.active = 1 and t.state in ('P','R') \
and ('$1' between from_unixtime(t.day + t.starttime div 100 * 60 * 60 + t.starttime % 100 * 60) and from_unixtime(t.day + t.endtime div 100 * 60 * 60 + t.endtime % 100 * 60)) \
and v.name = '$2' \
- order by t.day, start;"
+ order by t.day, start;"
diff --git a/update.c b/update.c
index 5fa7b58..d307f8b 100644
--- a/update.c
+++ b/update.c
@@ -1395,6 +1395,9 @@ int cEpgd::checkProcedure(const char* name, cDBS::ProcType type, cDbProcedure* f
asprintf(&param, "%s.md5", name);
p = fp ? fp : new cDbProcedure(connection, name, type);
+ if (!connection || !connection->getMySql())
+ return fail;
+
if (p->created())
{
getParameter("epgd", param, md5);