summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Hanisch <dvb@flensrocker.de>2011-10-27 00:31:51 +0200
committerLars Hanisch <dvb@flensrocker.de>2011-10-27 00:31:51 +0200
commit70a9709562d376b2f71bb910af11e9375effec8c (patch)
tree7c2084e1b7d52f8164f687522f170e8ef5b4346c
parentb260a0008f98e42a03be27e1c5688a30f8481cd6 (diff)
downloadvdr-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--HISTORY4
-rw-r--r--dynamicdevice.c8
-rw-r--r--dynamite.c2
3 files changed, 10 insertions, 4 deletions
diff --git a/HISTORY b/HISTORY
index 6e0d287..1a6c73b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -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)
diff --git a/dynamite.c b/dynamite.c
index 914c1ea..2519ab9 100644
--- a/dynamite.c
+++ b/dynamite.c
@@ -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;