diff options
author | Lars Hanisch <dvb@flensrocker.de> | 2011-10-27 00:31:51 +0200 |
---|---|---|
committer | Lars Hanisch <dvb@flensrocker.de> | 2011-10-27 00:31:51 +0200 |
commit | 70a9709562d376b2f71bb910af11e9375effec8c (patch) | |
tree | 7c2084e1b7d52f8164f687522f170e8ef5b4346c | |
parent | b260a0008f98e42a03be27e1c5688a30f8481cd6 (diff) | |
download | vdr-plugin-dynamite-0.0.8c.tar.gz vdr-plugin-dynamite-0.0.8c.tar.bz2 |
correct call of the idle hookv0.0.8c
-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; |