summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Hanisch <dvb@flensrocker.de>2011-12-08 00:07:19 +0100
committerLars Hanisch <dvb@flensrocker.de>2011-12-08 00:07:19 +0100
commit6766fad3d51a176dad50698a1b94c460ffd28578 (patch)
treec204e87d0dc067dc9993b0da216f856f3cbb3604
parentf140391bee64a89b7bd91230b1ea0b356cc43768 (diff)
downloadvdr-plugin-dynamite-6766fad3d51a176dad50698a1b94c460ffd28578.tar.gz
vdr-plugin-dynamite-6766fad3d51a176dad50698a1b94c460ffd28578.tar.bz2
fix a possible double attach of devices if they have a cardindex set with udevv0.0.8e
-rw-r--r--HISTORY4
-rw-r--r--dynamicdevice.c2
-rw-r--r--dynamite.c2
3 files changed, 6 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index 3372c18..46aaa68 100644
--- a/HISTORY
+++ b/HISTORY
@@ -204,3 +204,7 @@ VDR Plugin 'dynamite' Revision History
2011-12-04: Version 0.0.8d
- allow disable of auto-idle per device via Service/SVDRP/udev
+
+2011-12-08: Version 0.0.8e
+
+- fix a possible double attach of devices if they have a cardindex set with udev
diff --git a/dynamicdevice.c b/dynamicdevice.c
index 7327f55..1758cf7 100644
--- a/dynamicdevice.c
+++ b/dynamicdevice.c
@@ -26,7 +26,7 @@ int cDynamicDevice::IndexOf(const char *DevPath, int &NextFreeIndex, int WishInd
isyslog("dynamite: device at slot %d has cardindex %d", i + 1, dynamicdevice[i]->CardIndex());
if ((NextFreeIndex < 0) || ((WishIndex >= 0) && (dynamicdevice[i]->CardIndex() == WishIndex))) {
NextFreeIndex = i;
- if (dynamicdevice[i]->CardIndex() == WishIndex)
+ if ((dynamicdevice[i]->CardIndex() == WishIndex) && (index >= 0))
break;
}
}
diff --git a/dynamite.c b/dynamite.c
index e1bd370..2aa39e4 100644
--- a/dynamite.c
+++ b/dynamite.c
@@ -10,7 +10,7 @@
#include "menu.h"
#include "monitor.h"
-static const char *VERSION = "0.0.8d";
+static const char *VERSION = "0.0.8e";
static const char *DESCRIPTION = tr("attach/detach devices on the fly");
static const char *MAINMENUENTRY = NULL;