Failed compile with Burn and Streamdev plugins against vdr-1.3.47

Message ID 4443F9DB.70909@syphir.sytes.net
State New
Headers

Commit Message

C.Y.M April 17, 2006, 8:26 p.m. UTC
  > 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

Peter Dittmann April 18, 2006, 3:10 p.m. UTC | #1
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 
;-)
  

Patch

--- streamdev/streamdev-server.c.orig	2005-02-01 05:24:07.000000000 -0800
+++ streamdev/streamdev-server.c	2006-04-17 13:14:25.000000000 -0700
@@ -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) {
diff -ru vdr-1.3.46-eepg/PLUGINS/src/streamdev/streamdev-server.h vdr-1.3.47-eepg/PLUGINS/src/streamdev/streamdev-server.h
--- vdr-1.3.46-eepg/PLUGINS/src/streamdev/streamdev-server.h	2004-08-17 07:48:04.000000000 -0700
+++ vdr-1.3.47-eepg/PLUGINS/src/streamdev/streamdev-server.h	2006-04-17 13:11:56.000000000 -0700
@@ -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);