diff options
author | Christian Wieninger <cwieninger@gmx.de> | 2013-01-14 19:03:33 +0100 |
---|---|---|
committer | Christian Wieninger <cwieninger@gmx.de> | 2013-01-14 19:03:33 +0100 |
commit | f897f4833fc1f4280ec71c5385210f6813ebf609 (patch) | |
tree | 8ffe94d3a99e84b23f37b290939e823ea07ac72d /conflictcheck.c | |
parent | b90d5defb67c0598ddb6009237e5ff4ccf999f9e (diff) | |
download | vdr-plugin-epgsearch-f897f4833fc1f4280ec71c5385210f6813ebf609.tar.gz vdr-plugin-epgsearch-f897f4833fc1f4280ec71c5385210f6813ebf609.tar.bz2 |
implement device bonding in timer conflict checker, thanks to Joachim Wilke for providing a patch
Diffstat (limited to 'conflictcheck.c')
-rw-r--r-- | conflictcheck.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/conflictcheck.c b/conflictcheck.c index aa9c5e9..c8c1493 100644 --- a/conflictcheck.c +++ b/conflictcheck.c @@ -204,8 +204,33 @@ void cConflictCheck::InitDevicesInfo() for(int i=0; i<numDevices; i++) devices[i].device = cDevice::GetDevice(i); #endif + +#if APIVERSNUM > 10721 + BondDevices(Setup.DeviceBondings); +#endif +} + +void cConflictCheck::BondDevices(const char *Bondings) +{ +#if APIVERSNUM > 10721 + LogFile.Log(3, "Bond Devices"); + if (Bondings) { + cSatCableNumbers SatCableNumbers(MAXDEVICES, Bondings); + int* array = SatCableNumbers.Array(); + for (int i=0; i<SatCableNumbers.Size(); i++) { + for (int j=0; j<SatCableNumbers.Size(); j++) { + if (array[i] > 0 && array[i] == array[j] && i != j) { + LogFile.Log(3, "Bond devices %i and %i.", i+1, j+1); + devices[i].bondedDevices.push_back(&(devices[j])); + } + } + } + } + LogFile.Log(3, "Bond Devices done."); +#endif } + void cConflictCheck::Check() { if (evaltimeList) |