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 ?



Klaus Schmidinger wrote:
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.

So it just isn't that simple...
What about adding LOCK and ULCK commands to request exclusiveness whenever needed, and allow concurrent access otherwise?

LOCK could wait for a timeout, and if someone is blocking in exclusive mode, fail. After LOCK succeeds, this connection has exclusive access to modification commands until ULCK or disconnect.

To keep compatibility, all list and modification commands need to auto-lock of course. Maybe just keep compatibility mode until first use of LOCK or ULCK.

Some examples:

# Modify some timer:
LOCK 1s # wait 1s for lock or fail
LSTT
DELT x
ULCK # now free for all again
QUIT

# Backwards compatible:
LSTT # this will auto-lock
DELT x
QUIT # ... until quit

# Just read the timers:
ULCK # Announce we know about locking and dont need to
LSTT
QUIT

# Fail badly:
ULCK # dont request lock
LSTT
DELT x # forbidden


Shouldnt be too difficult to implement and should not break too much compatibility.

Udo





Home | Main Index | Thread Index