Mailing List archive

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

[vdr] Re: How to kill an svdrp connection from vdr ?



Philip Lawatsch wrote:
> 
> Klaus Schmidinger wrote:
> 
> >>>From my point of view the uniqueness of the SVDRP is a complete
> >>nonsense... And I really hope this will change :-)
> >
> >
> > Allowing more than one concurrent SVDRP connection would require
> > extensive locking mechanisms to avoid problems when accessing timers
> > etc. That's why there is (currently) only one SVDRP connection possible.
> 
> Thats simply not true.
> 
> I had a look at the svdrp code and actually thought about implementing
> this myself for quite a while now.
> 
> All you basically have to do is the following:
> 
> You have one thread doing all the svdrp work.
> 
> This thread would simply have to monitor all connections using select
> and once a whole commmand came in from one connection execute the
> command. This way there is only sequential execution of svdrp commands.
> 
> Its that simple, _as long as_ svdrp remains stateless between commands.
> If ever you have a situation where 2 commands depend on each other
> you've got a problem.

DELR depends on a previous LSTR (for the recording number).
DELT, MODT and UPDT depend on a previous LSTT (for the timer number).
MODC depends on a previous LSTC (for the channel number).
HITKs from different connections could lead to complete confusion.

Just one example: SVDRP connection A does LSTT and gets a list of,
say, 5 timers. Connection B does the same and decides to delete timer
number 2. Now connection A does a MODT on timer 3 - well, at least what
it thought was timer 3, because that is now what used to be timer 4.

So it just isn't that simple...

Klaus




Home | Main Index | Thread Index