]> git.vomp.tv Git - vompserver.git/commitdiff
Makefile changes as per VDR HISTORY file
authorChris Tallon <chris@vomp.tv>
Mon, 28 May 2012 21:53:23 +0000 (22:53 +0100)
committerChris Tallon <chris@vomp.tv>
Mon, 28 May 2012 21:53:23 +0000 (22:53 +0100)
Changes for compilation with VDR 1.21+

.gitignore [new file with mode: 0644]
Makefile
vompclientrrproc.c

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..100f728
--- /dev/null
@@ -0,0 +1,3 @@
+*.o
+.dependencies
+*~
index 4e83ec3908060137ee47ddf7567199ef261813b2..ef3e4af3b745f1e86852bedac7fc36e794cd56c2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 #
 # Makefile for a Video Disk Recorder plugin
 #
-# $Id$
+# $Id: Makefile,v 1.17 2009/05/30 14:22:59 christallon Exp $
 
 # The official name of this plugin.
 # This name will be used in the '-P...' option of VDR to load the plugin.
@@ -17,9 +17,9 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
 
 CXX      ?= g++
 ifdef DEBUG
-CXXFLAGS ?= -g -fPIC -Wall -Woverloaded-virtual #-Werror
+CXXFLAGS ?= -g -Wall -Woverloaded-virtual -Wno-parentheses #-Werror
 else
-CXXFLAGS ?= -O2 -fPIC -Wall -Woverloaded-virtual #-Werror
+CXXFLAGS ?= -O2 -Wall -Woverloaded-virtual -Wno-parentheses #-Werror
 endif
 
 ### The directory environment:
@@ -28,6 +28,10 @@ VDRDIR = ../../..
 LIBDIR = ../../lib
 TMPDIR = /tmp
 
+### Make sure that necessary options are included:
+
+include $(VDRDIR)/Make.global
+
 ### Allow user defined options to overwrite defaults:
 
 -include $(VDRDIR)/Make.config
index 1476880d7b8016c11e97954193916ae1c781c7bc..ccc628f9cb2bd330b7ced6b1b36254760ad01297 100644 (file)
@@ -57,7 +57,9 @@ VompClientRRProc::~VompClientRRProc()
 
 bool VompClientRRProc::init()
 {
-  return threadStart();
+  int a = threadStart();
+  sleep(1);
+  return a;
 }
 
 bool VompClientRRProc::recvRequest(RequestPacket* newRequest)
@@ -71,6 +73,7 @@ bool VompClientRRProc::recvRequest(RequestPacket* newRequest)
      Marten
   */
 
+  log->log("RRProc", Log::DEBUG, "recvReq");
   threadLock();
   req_queue.push(newRequest);
   threadSignalNoLock();
@@ -601,7 +604,11 @@ int VompClientRRProc::processGetRecordingsList()
 
   for (cRecording *recording = Recordings.First(); recording; recording = Recordings.Next(recording))
   {
+#if VDRVERSNUM < 10721
     resp->addULONG(recording->start);
+#else
+    resp->addULONG(recording->Start());
+#endif
     resp->addString(recording->Name());
     resp->addString(recording->FileName());
   }
@@ -1449,9 +1456,9 @@ int VompClientRRProc::processSetTimer()
   timerString[d] = '\0';
 
   log->log("RRProc", Log::DEBUG, "Timer string after 1.2 conversion:");
-  log->log("RRProc", Log::DEBUG, "%s", timerString);
 
 #endif
+  log->log("RRProc", Log::DEBUG, "%s", timerString);
 
   cTimer *timer = new cTimer;
   if (timer->Parse((char*)timerString))
@@ -1468,7 +1475,7 @@ int VompClientRRProc::processSetTimer()
       resp->addULONG(0);
       resp->finalise();
       x.tcp.sendPacket(resp->getPtr(), resp->getLen());
-      return 1;
+      return 1; // FIXME - cTimer* timer is leaked here!
     }
     else
     {
@@ -1774,9 +1781,14 @@ int VompClientRRProc::processGetMarks()
     {
       for (const cMark *m = Marks.First(); m; m = Marks.Next(m))
       {
-        log->log("RRProc", Log::DEBUG, "found Mark %i", m->position);
+#if VDRVERSNUM < 10721
+        ULLONG mposition = m->position;
+#else
+        ULLONG mposition = m->Position();
+#endif
+        log->log("RRProc", Log::DEBUG, "found Mark %i", mposition);
 
-        resp->addULONG(m->position);
+        resp->addULONG(mposition);
       }
     }
     else