Klaus Schmidinger wrote:
Since cCamSlot::Reset() is the only place where resetTime is set to a non-zero value, and you had lines like "resetTime1: 1207548401" in your syslog_1 file, apparently the tc[i]->Process() call in cCamSlot::Process() must have failed.
Yes, reset came from this procedure. I added some printouts (look at attached diff).
How to see reason why this Reset() is called?
Arthur
--- ci.c.orig 2008-04-11 21:20:00.000000000 +0300 +++ ci.c 2008-04-11 23:37:16.000000000 +0300 @@ -1625,6 +1625,7 @@ for (int i = 1; i <= MAX_CONNECTIONS_PER_CAM_SLOT; i++) { if (tc[i]) { if (!tc[i]->Process()) { + isyslog("CAM DEBUG: Reset calling i=%d, tc[i]=%d", i, tc[i]); //AK Reset(); return; } @@ -1681,16 +1682,20 @@
bool cCamSlot::Reset(void) { + isyslog("CAM DEBUG: Reset called"); //AK cMutexLock MutexLock(&mutex); ChannelCamRelations.Reset(slotNumber); DeleteAllConnections(); if (ciAdapter) { dbgprotocol("Slot %d: reset...", slotNumber); + isyslog("CAM DEBUG: Slot %d: reset...", slotNumber); //AK if (ciAdapter->Reset(slotIndex)) { resetTime = time(NULL); dbgprotocol("ok.\n"); + isyslog("CAM DEBUG: ok"); //AK return true; } + isyslog("CAM DEBUG: failed"); //AK dbgprotocol("failed!\n"); } return false; @@ -1700,11 +1705,15 @@ { cMutexLock MutexLock(&mutex); eModuleStatus ms = ciAdapter ? ciAdapter->ModuleStatus(slotIndex) : msNone; + isyslog("CAM DEBUG: ms: %d resetTime: %d", ms, resetTime); //AK if (resetTime) { if (ms <= msReset) { - if (time(NULL) - resetTime < MODULE_RESET_TIMEOUT) + isyslog("CAM DEBUG: ms le msReset"); //AK + if (time(NULL) - resetTime < MODULE_RESET_TIMEOUT) { + isyslog("CAM DEBUG: return msReset"); //AK return msReset; } + } resetTime = 0; } return ms;
Apr 11 23:40:31 akovdr2 vdr: [6914] cTimeMs: using monotonic clock (resolution is 4000250 ns) Apr 11 23:40:31 akovdr2 vdr: [6914] VDR version 1.6.0 started Apr 11 23:40:31 akovdr2 vdr: [6914] codeset is 'UTF-8' - known Apr 11 23:40:31 akovdr2 vdr: [6914] found 23 locales in /usr/local/src/vdr-1.6.0/locale Apr 11 23:40:31 akovdr2 vdr: [6914] loading plugin: /usr/local/vdr/PLUGINS/lib/libvdr-xine.so.1.6.0 Apr 11 23:40:31 akovdr2 vdr: [6914] loading /usr/local/etc/vdr/setup.conf Apr 11 23:40:31 akovdr2 vdr: [6914] loading /usr/local/etc/vdr/sources.conf Apr 11 23:40:31 akovdr2 vdr: [6914] loading /usr/local/etc/vdr/diseqc.conf Apr 11 23:40:31 akovdr2 vdr: [6914] loading /usr/local/etc/vdr/channels.conf Apr 11 23:40:31 akovdr2 vdr: [6914] loading /usr/local/etc/vdr/timers.conf Apr 11 23:40:31 akovdr2 vdr: [6914] loading /usr/local/etc/vdr/svdrphosts.conf Apr 11 23:40:31 akovdr2 vdr: [6914] loading /usr/local/etc/vdr/remote.conf Apr 11 23:40:31 akovdr2 vdr: [6914] loading /usr/local/etc/vdr/keymacros.conf Apr 11 23:40:31 akovdr2 vdr: [6915] video directory scanner thread started (pid=6914, tid=6915) Apr 11 23:40:31 akovdr2 vdr: [6915] video directory scanner thread ended (pid=6914, tid=6915) Apr 11 23:40:31 akovdr2 vdr: [6916] video directory scanner thread started (pid=6914, tid=6916) Apr 11 23:40:31 akovdr2 vdr: [6916] video directory scanner thread ended (pid=6914, tid=6916) Apr 11 23:40:31 akovdr2 vdr: [6914] reading EPG data from /usr/local/etc/vdr/epg.data Apr 11 23:40:31 akovdr2 vdr: [6914] probing /dev/dvb/adapter0/frontend0 Apr 11 23:40:31 akovdr2 vdr: [6914] CAM DEBUG: Reset called Apr 11 23:40:31 akovdr2 vdr: [6914] CAM DEBUG: Slot 1: reset... Apr 11 23:40:31 akovdr2 vdr: [6914] CAM DEBUG: ok Apr 11 23:40:31 akovdr2 vdr: [6918] CI adapter on device 0 thread started (pid=6914, tid=6918) Apr 11 23:40:31 akovdr2 vdr: [6918] CAM DEBUG: ms: 2 resetTime: 1207946431 Apr 11 23:40:31 akovdr2 vdr: [6918] CAM 1: module present Apr 11 23:40:31 akovdr2 vdr: [6918] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:31 akovdr2 vdr: [6919] tuner on device 1 thread started (pid=6914, tid=6919) Apr 11 23:40:31 akovdr2 vdr: [6920] section handler thread started (pid=6914, tid=6920) Apr 11 23:40:31 akovdr2 vdr: [6914] found 1 video device Apr 11 23:40:31 akovdr2 vdr: [6914] initializing plugin: xine (0.8.2): Software based playback using xine Apr 11 23:40:31 akovdr2 vdr: [6921] XineRemote control thread started (pid=6914, tid=6921) Apr 11 23:40:31 akovdr2 vdr: [6921] Entering cXineRemote thread Apr 11 23:40:31 akovdr2 vdr: [6914] setting primary device to 2 Apr 11 23:40:31 akovdr2 vdr: [6914] assuming manual start of VDR Apr 11 23:40:31 akovdr2 vdr: [6914] SVDRP listening on port 2001 Apr 11 23:40:31 akovdr2 vdr: [6914] setting current skin to "sttng" Apr 11 23:40:31 akovdr2 vdr: [6914] loading /usr/local/etc/vdr/themes/sttng-default.theme Apr 11 23:40:31 akovdr2 vdr: [6914] starting plugin: xine Apr 11 23:40:31 akovdr2 vdr: [6924] KBD remote control thread started (pid=6914, tid=6924) Apr 11 23:40:31 akovdr2 vdr: [6914] ERROR: remote control XineRemote not ready! Apr 11 23:40:31 akovdr2 vdr: [6914] remote control KBD - keys known Apr 11 23:40:31 akovdr2 vdr: [6914] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:31 akovdr2 vdr: [6918] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:31 akovdr2 vdr: [6914] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:31 akovdr2 vdr: [6918] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:31 akovdr2 vdr: [6914] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:31 akovdr2 kernel: dvb_ca adapter 0: DVB CAM detected and initialised successfully Apr 11 23:40:31 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:31 akovdr2 vdr: [6918] CAM 1: module ready Apr 11 23:40:31 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:31 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:31 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:31 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:31 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:32 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:33 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6918] CAM DEBUG: Reset calling i=1, tc[i]=136770992 Apr 11 23:40:34 akovdr2 vdr: [6918] CAM DEBUG: Reset called Apr 11 23:40:34 akovdr2 vdr: [6918] CAM DEBUG: Slot 1: reset... Apr 11 23:40:34 akovdr2 vdr: [6918] CAM DEBUG: ok Apr 11 23:40:34 akovdr2 vdr: [6918] CAM DEBUG: ms: 2 resetTime: 1207946434 Apr 11 23:40:34 akovdr2 vdr: [6918] CAM 1: module present Apr 11 23:40:34 akovdr2 vdr: [6914] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6918] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6914] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6918] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6914] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6918] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:34 akovdr2 kernel: dvb_ca adapter 0: DVB CAM detected and initialised successfully Apr 11 23:40:34 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6918] CAM 1: module ready Apr 11 23:40:34 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:34 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:35 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:36 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:37 akovdr2 vdr: [6918] CAM DEBUG: Reset calling i=1, tc[i]=136770992 Apr 11 23:40:37 akovdr2 vdr: [6918] CAM DEBUG: Reset called Apr 11 23:40:37 akovdr2 vdr: [6918] CAM DEBUG: Slot 1: reset... Apr 11 23:40:37 akovdr2 vdr: [6918] CAM DEBUG: ok Apr 11 23:40:37 akovdr2 vdr: [6914] CAM DEBUG: ms: 2 resetTime: 1207946437 Apr 11 23:40:37 akovdr2 vdr: [6918] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:37 akovdr2 vdr: [6918] CAM 1: module present Apr 11 23:40:37 akovdr2 vdr: [6914] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:37 akovdr2 vdr: [6918] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:37 akovdr2 vdr: [6914] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:37 akovdr2 vdr: [6918] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:37 akovdr2 vdr: [6914] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:37 akovdr2 vdr: [6918] CAM DEBUG: ms: 2 resetTime: 0 Apr 11 23:40:37 akovdr2 kernel: dvb_ca adapter 0: DVB CAM detected and initialised successfully Apr 11 23:40:37 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:37 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:37 akovdr2 vdr: [6918] CAM 1: module ready Apr 11 23:40:37 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:37 akovdr2 vdr: [6918] CAM DEBUG: ms: 3 resetTime: 0 Apr 11 23:40:37 akovdr2 vdr: [6914] CAM DEBUG: ms: 3 resetTime: 0