summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2017-06-11 18:08:02 +0200
committerhorchi <vdr@jwendel.de>2017-06-11 18:08:02 +0200
commitf414acdadb344f39285e26f0ce8861764efadde1 (patch)
tree2f4e11e7df22c5ee9240be49a4d16205e9a5146b
parent62b7aaad6475576fa8f0b415612054d36da74fc3 (diff)
downloadvdr-plugin-epg2vdr-f414acdadb344f39285e26f0ce8861764efadde1.tar.gz
vdr-plugin-epg2vdr-f414acdadb344f39285e26f0ce8861764efadde1.tar.bz2
2017-06-11: version 1.1.68 (horchi)\n - change: Added lock macros for easier handling the vdr versions\n\n1.1.68
-rw-r--r--HISTORY.h5
-rw-r--r--lib/vdrlocks.h34
-rw-r--r--update.c14
3 files changed, 46 insertions, 7 deletions
diff --git a/HISTORY.h b/HISTORY.h
index af41e84..3c84f71 100644
--- a/HISTORY.h
+++ b/HISTORY.h
@@ -5,7 +5,7 @@
*
*/
-#define _VERSION "1.1.67"
+#define _VERSION "1.1.68"
#define VERSION_DATE "11.06.2017"
#define DB_API 4
@@ -19,6 +19,9 @@
/*
* ------------------------------------
+2017-06-11: version 1.1.68 (horchi)
+ - change: Added lock macros for easier handling the vdr versions
+
2017-06-11: version 1.1.67 (horchi)
- change: Porting to VDR 2.3.7
diff --git a/lib/vdrlocks.h b/lib/vdrlocks.h
new file mode 100644
index 0000000..d499bc7
--- /dev/null
+++ b/lib/vdrlocks.h
@@ -0,0 +1,34 @@
+/*
+ * vdrlocks.h
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#ifndef __VDRLOCKS_H
+# define __VDRLOCKS_H
+
+# ifdef VDR_PLUGIN
+
+# include <vdr/config.h>
+# include <vdr/tools.h>
+
+
+#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+# define GET_TIMERS_READ(name) USE_LIST_LOCK_READ(Timers); \
+ const cTimers* name = Timers;
+#else
+# define GET_TIMERS_READ cTimers* timers = &Timers;
+#endif
+
+#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+# define GET_TIMERS_WRITE(name) USE_LIST_LOCK_WRITE(Timers); \
+ cTimers* name = Timers;
+#else
+# define GET_TIMERS_READ cTimers* timers = &Timers;
+#endif
+
+//***************************************************************************
+# endif // VDR_PLUGIN
+
+#endif //___VDRLOCKS_H
diff --git a/update.c b/update.c
index 92c72e0..a3cbd3f 100644
--- a/update.c
+++ b/update.c
@@ -10,6 +10,7 @@
#include <vdr/videodir.h>
#include <vdr/tools.h>
+#include "lib/vdrlocks.h"
#include "lib/xml.h"
#include "epg2vdr.h"
#include "update.h"
@@ -1624,12 +1625,13 @@ int cUpdate::refreshEpg(const char* forChannelId, int maxTries)
if (timerChanges)
{
-#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
- LOCK_TIMERS_WRITE;
- cTimers* timers = Timers;
-#else
- cTimers* timers = &Timers;
-#endif
+//#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+ GET_TIMERS_WRITE(timers);
+ // LOCK_TIMERS_WRITE;
+ // cTimers* timers = Timers;
+// #else
+// cTimers* timers = &Timers;
+// #endif
timers->SetModified();
}