Mailing List archive

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

[vdr] SVDRP - problems when 2 sends nearly at same time -> e.g. vdradmindisturbs sleeptimer



Hi,

I'm using stable vdr 1.2.6.

The following commandline demonstrates a problem, that lets e.g. the sleeptimer-plugin not work correctly in conjunction with vdradmin. (Well, thats what I think the problem is, cause there are no errormessages from sleeptimer)

i=0; while true; do svdrpsend.pl MESG $i & sleep 2 ; i=$((i+1)) ; done

/var/log/syslog:

Jul 17 11:14:16 mediaportal vdr[708]: SVDRP message: '0'
Jul 17 11:14:16 mediaportal vdr[708]: info: 0
Jul 17 11:14:18 mediaportal vdr[708]: connect from 127.0.0.1, port 1305 - accept
ed
Jul 17 11:14:18 mediaportal vdr[708]: SVDRP message: '1'
Jul 17 11:14:19 mediaportal vdr[708]: info: 1
Jul 17 11:14:20 mediaportal vdr[708]: connect from 127.0.0.1, port 1306 - accept
ed
Jul 17 11:14:20 mediaportal vdr[708]: SVDRP message: '2'
Jul 17 11:14:23 mediaportal vdr[708]: connect from 127.0.0.1, port 1307 - accept
ed
Jul 17 11:14:23 mediaportal vdr[708]: SVDRP message: '3'
Jul 17 11:14:23 mediaportal vdr[708]: info: 3
Jul 17 11:14:24 mediaportal vdr[708]: connect from 127.0.0.1, port 1308 - accept
ed
Jul 17 11:14:24 mediaportal vdr[708]: SVDRP message: '4'
Jul 17 11:14:26 mediaportal vdr[708]: connect from 127.0.0.1, port 1309 - accept
ed
Jul 17 11:14:26 mediaportal vdr[708]: SVDRP message: '5'
Jul 17 11:14:27 mediaportal vdr[708]: info: 5
Jul 17 11:14:28 mediaportal vdr[708]: connect from 127.0.0.1, port 1310 - accept
ed
Jul 17 11:14:28 mediaportal vdr[708]: SVDRP message: '6'
Jul 17 11:14:31 mediaportal vdr[708]: connect from 127.0.0.1, port 1311 - accept
ed
Jul 17 11:14:31 mediaportal vdr[708]: SVDRP message: '7'
Jul 17 11:14:31 mediaportal vdr[708]: info: 7
Jul 17 11:14:32 mediaportal vdr[708]: connect from 127.0.0.1, port 1312 - accept
ed
Jul 17 11:14:32 mediaportal vdr[708]: SVDRP message: '8'
Jul 17 11:14:34 mediaportal vdr[708]: connect from 127.0.0.1, port 1313 - accept
ed
Jul 17 11:14:34 mediaportal vdr[708]: SVDRP message: '9'
Jul 17 11:14:34 mediaportal vdr[708]: info: 9
Jul 17 11:14:35 mediaportal vdr[708]: connect from 127.0.0.1, port 1314 - accept
ed

Ok that looks good, but an the TV not every message is shown!

Why is this a problem?
I have vdradmin running. That does a svdrp connect every minute or something to read the epg or what ever. Now, when I set a sleeptimer with sleeptimer-plugin, it could happen, that the vdr does not shutdown. The sleeptimer-plugin simply is running a script like the following when the time I configured as sleep-time is over:

sleeptimer.sh:

#!/bin/sh
echo "svdrpsend.pl HITK Power" | at now

Like with the example above this svdrpsend command could have been ignored by vdr and the system does not shutdown. The workaround could be to call a sleeptimer2.sh via atd :

sleeptimer2.sh:

#!/bin/sh
i=10
while test $i -gt 0 ; do
svdrpsend.pl HITK Power
sleep 5
i=$((i-1))
done

But I think, that's a bit dirty.
I know, making svdrpsend queueing all commands ever send, could have other bad effects. E. g. when doing the first example without the "sleep 2" . So what are your opinions about that problem?

Regards
Marten


--
Hi! I'm a signature virus, copy me in your ~/.signature to help me spread.

Attachment: signature.asc
Description: OpenPGP digital signature


Home | Main Index | Thread Index