--- 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;