summaryrefslogtreecommitdiff
path: root/svdrp.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-06-25 12:43:09 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-06-25 12:43:09 +0200
commita28d92d0490e75f2be7d7239ac491683e215c42f (patch)
tree26e03ce91aef54d293367d95f9b39799b936f7cd /svdrp.c
parent39294e0147ef76cf6bf239f23f095836e3c65f6d (diff)
downloadvdr-a28d92d0490e75f2be7d7239ac491683e215c42f.tar.gz
vdr-a28d92d0490e75f2be7d7239ac491683e215c42f.tar.bz2
Whenever a change is made to the recordings in the video directory, the SVDRP command UPDR is now sent to all peer VDRs
Diffstat (limited to 'svdrp.c')
-rw-r--r--svdrp.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/svdrp.c b/svdrp.c
index 2b63c801..924acd36 100644
--- a/svdrp.c
+++ b/svdrp.c
@@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection.
*
- * $Id: svdrp.c 4.20 2017/05/31 14:02:17 kls Exp $
+ * $Id: svdrp.c 4.21 2017/06/25 12:31:13 kls Exp $
*/
#include "svdrp.h"
@@ -2600,3 +2600,15 @@ bool ExecSVDRPCommand(const char *ServerName, const char *Command, cStringList *
return SVDRPClientHandler->Execute(ServerName, Command, Response);
return false;
}
+
+void BroadcastSVDRPCommand(const char *Command)
+{
+ cMutexLock MutexLock(&SVDRPHandlerMutex);
+ cStringList ServerNames;
+ if (SVDRPClientHandler) {
+ if (SVDRPClientHandler->GetServerNames(&ServerNames)) {
+ for (int i = 0; i < ServerNames.Size(); i++)
+ ExecSVDRPCommand(ServerNames[i], Command);
+ }
+ }
+}