summaryrefslogtreecommitdiff
path: root/dynamicdevice.c
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 /dynamicdevice.c
parentb260a0008f98e42a03be27e1c5688a30f8481cd6 (diff)
downloadvdr-plugin-dynamite-70a9709562d376b2f71bb910af11e9375effec8c.tar.gz
vdr-plugin-dynamite-70a9709562d376b2f71bb910af11e9375effec8c.tar.bz2
correct call of the idle hookv0.0.8c
Diffstat (limited to 'dynamicdevice.c')
-rw-r--r--dynamicdevice.c8
1 files changed, 5 insertions, 3 deletions
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)