summaryrefslogtreecommitdiff
path: root/conflictcheck.c
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger@gmx.de>2013-01-14 19:03:33 +0100
committerChristian Wieninger <cwieninger@gmx.de>2013-01-14 19:03:33 +0100
commitf897f4833fc1f4280ec71c5385210f6813ebf609 (patch)
tree8ffe94d3a99e84b23f37b290939e823ea07ac72d /conflictcheck.c
parentb90d5defb67c0598ddb6009237e5ff4ccf999f9e (diff)
downloadvdr-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.c25
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)