Hi,
I've tried to get the timers to work together with my vd 1.3.36.
First, there does not exist an any Active(void) method on class cTimer anymore. It is now called Flags.
I've changed it. After the editing the plugin did compile again, but pressing the Timers menu item results in a crash of the vdr.
It restarts and the client states e.g.:
22:38:47.394143 [ERR] TCP - Detected connection closed
Btw. I would translate "Timers" into "german" "Timer". It's not german actually, but common known angelism.
Has anyone an idea to solve this problem?
I'he attached the timers.h of my vdr.
Yours
Torsten
Hi again,
I hope the attachment is now there ;)
CU
Torsten
Wow, you're a bit cutting edge there! I am working with 1.2 here and until I have some more of it working I won't be doing 1.3 compatibility. By all means, continue to work on it though! :)
Don't get too bothered about it yet, all it does is display a list.
To all: This is how the CVS will be from now on - now that a stable released package is available on SourceForge for the server plugin, the plugin CVS could be in any state.
It might make sense to switch the main development platform into 1.3.x branch as I think that 95% of people use 1.3.x VDR and is probably even more mature than 1.2.26. The last 1.2.26 release is anyway from year 2003. Just my two cents, no offense intended.
Thanks,
'' kml
i entirely agree with kml.
but then again... Klaus is gonna come up with 1.4 eventually.
its like playing with the sword of Damocles *g*.
cheers
Harry
Here's a patch for vdr 1.3.37 which allows the plugin to compile. However vdr segfaults when the 'timers' option on the client is selected.
Index: vompserver/mvpclient.c
===================================================================
RCS file: /cvsroot/vomp/vompserver/mvpclient.c,v
retrieving revision 1.15
diff -u -r1.15 mvpclient.c
--- vompserver/mvpclient.c 3 Jan 2006 17:53:38 -0000 1.15
+++ vompserver/mvpclient.c 5 Jan 2006 16:58:28 -0000
@@ -1182,7 +1182,11 @@
cTimer *timer = Timers.Get(i);
//Reply(i < Timers.Count() - 1 ? -250 : 250, "%d %s", timer->Index() + 1, timer->ToText());
log->log("-", Log::DEBUG, "i=%i count=%i index=%d", i, Timers.Count(), timer->Index() + 1);
+#if VDRVERSNUM < 10300
log->log("-", Log::DEBUG, "active=%i recording=%i pending=%i start=%li stop=%li priority=%i lifetime=%i", timer->Active(), timer->Recording(), timer->Pending(), timer->StartTime(), timer->StopTime(), timer->Priority(), timer->Lifetime());
+#else
+ log->log("-", Log::DEBUG, "active=%i recording=%i pending=%i start=%li stop=%li priority=%i lifetime=%i", timer->HasFlags(tfActive), timer->Recording(), timer->Pending(), timer->StartTime(), timer->StopTime(), timer->Priority(), timer->Lifetime());
+#endif
log->log("-", Log::DEBUG, "channel=%i file=%s summary=%s", timer->Channel()->Number(), timer->File(), timer->Summary());
log->log("-", Log::DEBUG, "");
}
@@ -1217,7 +1221,11 @@
timer = Timers.Get(i);
+#if VDRVERSNUM < 10300
*(ULONG*)&sendBuffer[count] = htonl(timer->Active()); count += 4;
+#else
+ *(ULONG*)&sendBuffer[count] = htonl(timer->HasFlags(tfActive)); count += 4;
+#endif
*(ULONG*)&sendBuffer[count] = htonl(timer->Recording()); count += 4;
*(ULONG*)&sendBuffer[count] = htonl(timer->Pending()); count += 4;
*(ULONG*)&sendBuffer[count] = htonl(timer->Priority()); count += 4;
Okay, this fixes the segfault.
It seems that under 1.3.x, timer->Summary can return a NULL pointer rather than a pointer to NULL.
Hi, the patch works.
Unfortunatly I patched the plugin myself before reading the last posting. Quite the same code.
Thank you for your help.
Torsten