summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-04-17 09:10:39 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-04-17 09:10:39 +0200
commitacf716f1ef5e4cdbc2b38fecdf4d46b2ad75b747 (patch)
tree19e8f750d1092403c40078c607d94715fcb7ebb4 /remote.c
parent8c6deb20f2fc1c77c0fa2698e20f998ebda355a2 (diff)
downloadvdr-acf716f1ef5e4cdbc2b38fecdf4d46b2ad75b747.tar.gz
vdr-acf716f1ef5e4cdbc2b38fecdf4d46b2ad75b747.tar.bz2
The cRemote::CallPlugin() function now has a boolean return value that tells the caller whether initiating the plugin call was successful
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/remote.c b/remote.c
index 1687d018..c0b92867 100644
--- a/remote.c
+++ b/remote.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remote.c 1.49 2006/01/29 12:27:08 kls Exp $
+ * $Id: remote.c 1.50 2006/04/17 08:58:28 kls Exp $
*/
#include "remote.h"
@@ -145,10 +145,23 @@ bool cRemote::Put(const char *Code, bool Repeat, bool Release)
return false;
}
-void cRemote::CallPlugin(const char *Plugin)
+bool cRemote::CallPlugin(const char *Plugin)
{
- plugin = Plugin;
- Put(k_Plugin);
+ cMutexLock MutexLock(&mutex);
+ if (!plugin) {
+ plugin = Plugin;
+ Put(k_Plugin);
+ return true;
+ }
+ return false;
+}
+
+const char *cRemote::GetPlugin(void)
+{
+ cMutexLock MutexLock(&mutex);
+ const char *p = plugin;
+ plugin = NULL;
+ return p;
}
bool cRemote::HasKeys(void)