diff options
author | Lars Hanisch <dvb@flensrocker.de> | 2012-03-08 02:18:27 +0100 |
---|---|---|
committer | Lars Hanisch <dvb@flensrocker.de> | 2012-03-08 02:18:27 +0100 |
commit | 6b23ba47b4b8358ea94dd503167118b022e48eb9 (patch) | |
tree | f2319a763dc9b7a4ae9892d6de3735b6d9741557 | |
parent | b04539ce840bd1b0dda459545d2d94890947eb49 (diff) | |
download | vdr-plugin-dynamite-0.0.9c.tar.gz vdr-plugin-dynamite-0.0.9c.tar.bz2 |
on force detach queue command, don't delete directly on the callv0.0.9c
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | dynamicdevice.c | 10 | ||||
-rw-r--r-- | dynamite.c | 2 |
3 files changed, 11 insertions, 5 deletions
@@ -248,3 +248,7 @@ VDR Plugin 'dynamite' Revision History 2012-02-05: Version 0.0.9b - add udev attribute "dynamite_sources" which will limit the reception of the device to the given sources + +2012-03-08: Version 0.0.9c + +- on "force detach" queue command, don't delete directly on the call diff --git a/dynamicdevice.c b/dynamicdevice.c index 6845e1c..c9b640d 100644 --- a/dynamicdevice.c +++ b/dynamicdevice.c @@ -151,10 +151,12 @@ void cDynamicDevice::DetachAllDevices(bool Force) cMutexLock lock(&arrayMutex); isyslog("dynamite: %sdetaching all devices", (Force ? "force " : "")); for (int i = 0; i < numDynamicDevices; i++) { - if (Force) - dynamicdevice[i]->DeleteSubDevice(); - else if (dynamicdevice[i]->devpath) - cDynamicDeviceProbe::QueueDynamicDeviceCommand(ddpcDetach, (**dynamicdevice[i]->devpath)); + if (dynamicdevice[i]->devpath) { + if (Force) + cDynamicDeviceProbe::QueueDynamicDeviceCommand(ddpcService, *cString::sprintf("dynamite-ForceDetachDevice-v0.1 %s", **dynamicdevice[i]->devpath)); + else + cDynamicDeviceProbe::QueueDynamicDeviceCommand(ddpcDetach, (**dynamicdevice[i]->devpath)); + } } } @@ -11,7 +11,7 @@ #include "monitor.h" #include "status.h" -static const char *VERSION = "0.0.9b"; +static const char *VERSION = "0.0.9c"; static const char *DESCRIPTION = tr("attach/detach devices on the fly"); static const char *MAINMENUENTRY = NULL; |