On 04/07/08 08:34, Arthur Konovalov wrote:
> Well,
> I'm not big guru of debugging.
> I made following changes to mentioned part of code:
>
> eModuleStatus cCamSlot::ModuleStatus(void)
> {
> cMutexLock MutexLock(&mutex);
> eModuleStatus ms = ciAdapter ? ciAdapter->ModuleStatus(slotIndex) :
> msNone;
> isyslog("ms: %d", ms); //AKO
> isyslog("resetTime1: %d", resetTime); //AK
> if (resetTime) {
> isyslog("resetTime2: %d", resetTime); //AK
> if (ms <= msReset) {
> isyslog("resetTime3: %d", resetTime); //AK
> if (time(NULL) - resetTime < MODULE_RESET_TIMEOUT)
> isyslog("resetTime4: %d", resetTime); //AK
> return msReset;
> }
> resetTime = 0;
> }
> return ms;
> }
>
> Log file attached. I suspect that additional instructions are welcome.
At this point...
> Apr 7 09:06:41 vdr vdr: [4862] ms: 3
> Apr 7 09:06:41 vdr vdr: [4862] resetTime1: 0
> Apr 7 09:06:41 vdr vdr: [4862] ms: 2
...the module status changed from 3 ("ready") to 2 ("present").
The module status is retrieved from the driver in cDvbCiAdapter::ModuleStatus():
eModuleStatus cDvbCiAdapter::ModuleStatus(int Slot)
{
ca_slot_info_t sinfo;
sinfo.num = Slot;
if (ioctl(fd, CA_GET_SLOT_INFO, &sinfo) != -1) {
if ((sinfo.flags & CA_CI_MODULE_READY) != 0)
return msReady;
else if ((sinfo.flags & CA_CI_MODULE_PRESENT) != 0)
return msPresent;
}
else
esyslog("ERROR: can't get info of CAM slot %d on device %d: %m", Slot,
device->DeviceNumber());
return msNone;
}
So for some reason the sinfo.flags doesn't seem to have the CA_CI_MODULE_READY
flag set any longer.
Klaus
_______________________________________________
vdr mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr