Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: An "old" Bug in VDR regarding SVDR



Matthias Schniedermeyer wrote:
> 
> #include <hallo.h>
> 
> As 2 other Persons had the Problem of a hanging Master-Timer. I now post
> (Klaus) patch for VDR in the Maillinglist. (So that others step into that
> trapdoor)
> 
> The Problem is that VDR Version <= 0.71 (All released Versions in other
> Words) have the Problem that "nothing" is returned when no Timer/Channel
> is defined. So the "while <SOCKET>" waits forever.
> 
> Klaus Patch changes that behaviour. Now a
> 550 No <channels/timers> defined
> is returned when there is no Timer/Channel defined.

Looks like Matthias' attachment didn't make it through the mailing
list gateway. Here's the patch against the VDR 0.71 svdrp.c:

--- svdrp.c     2001/02/18 14:18:13     1.14
+++ svdrp.c     2001/03/02 22:59:37     1.15
@@ -535,7 +535,7 @@
            Reply(250, "%d %s", next->number, next->ToText());
         }
      }
-  else {
+  else if (Channels.MaxNumber() >= 1) {
      for (int i = 1; i <= Channels.MaxNumber(); i++) {
          cChannel *channel = Channels.GetByNumber(i);
         if (channel)
@@ -544,6 +544,8 @@
            Reply(501, "Channel \"%d\" not found", i);
          }
      }
+  else
+     Reply(550, "No channels defined");
 }
 
 void cSVDRP::CmdLSTT(const char *Option)
@@ -559,7 +561,7 @@
      else
         Reply(501, "Error in timer number \"%s\"", Option);
      }
-  else {
+  else if (Timers.Count()) {
      for (int i = 0; i < Timers.Count(); i++) {
          cTimer *timer = Timers.Get(i);
         if (timer)
@@ -568,6 +570,8 @@
            Reply(501, "Timer \"%d\" not found", i + 1);
          }
      }
+  else
+     Reply(550, "No timers defined");
 }
 
 void cSVDRP::CmdMESG(const char *Option)

-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________


--- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index