From ad5448e5ad52d0084af3da9e57f9074df79b2db0 Mon Sep 17 00:00:00 2001 From: Johann Friedrichs Date: Fri, 10 Dec 2021 21:20:29 +0100 Subject: Wrong dev selection for conflict check diff --git a/conflictcheck.c b/conflictcheck.c index f890e37..835346a 100644 --- a/conflictcheck.c +++ b/conflictcheck.c @@ -704,10 +704,11 @@ int cConflictCheck::GetDevice(cConflictCheckTimerObj* TimerObj, bool* NeedsDetac imp |= devices[i].Receiving(); // do we have GetClippedNumProvidedSystems ??? uses MaxNumProvidedSystems in vdr since V1.7 !! // but should not be needed - imp <<= 2; - imp |= devices[i].NumProvidedSystems(); // avoid cards which support multiple delivery systems - // imp <<= 2; - // imp |= GetClippedNumProvidedSystems(2, device[i]) - 1; // avoid cards which support multiple delivery systems + imp <<= 5; // headroom for 31 Systems + int ProvidedSystems=devices[i].NumProvidedSystems(); + if (ProvidedSystems <= 0) // invalid return + ProvidedSystems = 1; + imp |= std::min(ProvidedSystems,31); // avoid cards which support multiple delivery systems // use the device with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used) imp <<= 8; imp |= std::min(std::max(devices[i].Priority() + MAXPRIORITY, 0), 0xFF); -- cgit v0.10.2