Failed compile with Burn and Streamdev plugins against vdr-1.3.47
Commit Message
> I came across this with streamdev earlier on. What I did as a quick bodge was
> rename the Active functions in streamdev-server to LActive in
> streamdev-server.h:24 and streamdev-server.c:58.
>
> Not as clean as a proper renaming patch but worked for me!
>
Actually, that was my first instinct as well.. to rename Active to something else :)
Although, this seems to work to.. (see attachments)
BR.
Comments
vdr-bounces@linuxtv.org schrieb am 17.04.2006 22:26:03:
>
> > I came across this with streamdev earlier on. What I did as a
> quick bodge was
> > rename the Active functions in streamdev-server to LActive in
> > streamdev-server.h:24 and streamdev-server.c:58.
> >
> > Not as clean as a proper renaming patch but worked for me!
> >
>
> Actually, that was my first instinct as well.. to rename Active to
> something else :)
>
> Although, this seems to work to.. (see attachments)
>
> BR.
>
> --- burn/burn.c.orig 2005-11-12 10:17:11.000000000 -0800
> +++ burn/burn.c 2006-04-17 13:10:40.000000000 -0700
> @@ -34,7 +34,7 @@
> virtual bool Start(void);
> virtual void Stop(void);
> virtual void Housekeeping(void);
> - virtual bool Active(void);
> + virtual cString Active(void);
> virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY);
}
> virtual cOsdObject *MainMenuAction(void);
> virtual cMenuSetupPage *SetupMenu(void);
> @@ -193,9 +193,11 @@
> cBurnMenuBurn::Housekeeping();
> }
>
> -bool cPluginBurn::Active(void)
> +cString cPluginBurn::Active(void)
> {
> - return cBurnMenuBurn::JobActive();
> + if(cBurnMenuBurn::JobActive())
> + return tr("Burn DVD job active");
> + return NULL;
> }
Rename would be quite wrong as burn and streamdev are already using this
new funktion.
It was previously hidden in the patch section of both plugins.
Klaus just opened up the idea somewhat more to allow for reporting the
busy-reason by the plugin.
The original idea of the burn/streamdev designer was to just report it's
busy.
Active() had previously no real function when VDR was not patched.
VDR was ignoring the busy plugin and just killed it :)
Now VDR should politely ask wether to kill burn and streamdev while they
are busy.
To make VDR master again you may have to remove some double checks in your
shutdown scripts for burn and streamdev.
VDR can still overrule a busy plugin by manually aknoledging a forced
shutdown.
Scripts do mostly not allow this.
If again some script kiddy continously tries to hack into my VDRs ssh
port, my shutdown script complain always about some still open ports.
Would be nice to replace this with some mini-plugin still allowing a
forced shutdown without having to kill sshd before VDR accepts shutting
down ;-))
May be it's a good idea now to move all the shutdown scripts to some
mini-plugin which still allowes a manual forced shutdown.
regards Peter
*********************************************************************************
It still surprises me that the "patch" was so quitely taken over by Klaus
;-)
@@ -46,8 +46,10 @@
return true;
}
-bool cPluginStreamdevServer::Active(void) {
- return cStreamdevServer::Active();
+cString cPluginStreamdevServer::Active(void) {
+ if(cStreamdevServer::Active())
+ return tr("Streamdev job active");
+ return NULL;
}
const char *cPluginStreamdevServer::MainMenuEntry(void) {
@@ -19,7 +19,7 @@
virtual const char *Version(void) { return VERSION; }
virtual const char *Description(void);
virtual bool Start(void);
- virtual bool Active(void);
+ virtual cString Active(void);
virtual const char *MainMenuEntry(void);
virtual cOsdObject *MainMenuAction(void);
virtual cMenuSetupPage *SetupMenu(void);