[vdr] vdr-api: how to check if VDR is up?
cwieninger at gmx.de
Mon Jun 8 08:59:07 CEST 2009
the epgsearch plugin handles some tasks as separate threads, that also
use SVDRP to talk to VDR. Currently these threads are started after a
fixed time (e.g. 20s) to give VDR the time to start up.
A user reported that epgsearch fails in SVDRP communication, because VDR
was still waiting for its devices (and therefore is not yet ready to
accept SVDRP connections):
Jun 3 20:07:40 vdr vdr:  not all devices ready after 30 seconds
These 30 seconds are only defined in vdr.c and are therefore 'invisible'
to plugins. So I'm looking for 'clean' way to check if VDR is up and ready.
Of course, one could do any SVDRP command, e.g. 'help', and check the
result, but thats quite cumbersome.
Next idea: use cPlugin::Housekeeping() to signal the threads that VDR is
idle now after startup. This works, but sometimes takes up to >90s.
Any idea how to get a better solution?
More information about the vdr