diff options
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | dynamicdevice.c | 8 | ||||
-rw-r--r-- | dynamite.c | 2 |
3 files changed, 10 insertions, 4 deletions
@@ -196,3 +196,7 @@ VDR Plugin 'dynamite' Revision History 2011-10-26: Version 0.0.8b - add udev monitor for remove events of usb hardware so devices can be detached on unplugging + +2011-10-27: Version 0.0.8c + +- correct call of the idle hook diff --git a/dynamicdevice.c b/dynamicdevice.c index 267038a..dc44ed0 100644 --- a/dynamicdevice.c +++ b/dynamicdevice.c @@ -295,9 +295,11 @@ eDynamicDeviceReturnCode cDynamicDevice::SetLockDevice(const char *DevPath, bool static void CallIdleHook(const char *IdleHook, const char *DevPath, bool Idle) { - const char *idleHookCmd = *cString::sprintf("%s --idle=%s --device=%s", IdleHook, (Idle ? "on" : "off"), DevPath); - isyslog("dynamite: calling idle hook %s", idleHookCmd); - SystemExec(idleHookCmd, false); + cString idleHookCmd = cString::sprintf("%s --idle=%s --device=%s", IdleHook, (Idle ? "on" : "off"), DevPath); + isyslog("dynamite: calling idle hook %s", *idleHookCmd); + int status = SystemExec(*idleHookCmd, false); + if (!WIFEXITED(status) || WEXITSTATUS(status)) + esyslog("SystemExec() failed with status %d", status); } eDynamicDeviceReturnCode cDynamicDevice::SetIdle(const char *DevPath, bool Idle) @@ -10,7 +10,7 @@ #include "menu.h" #include "monitor.h" -static const char *VERSION = "0.0.8b"; +static const char *VERSION = "0.0.8c"; static const char *DESCRIPTION = tr("attach/detach devices on the fly"); static const char *MAINMENUENTRY = NULL; |