]> git.webhop.me Git - input.git/commitdiff
use new pzapit to lock & unlock RC
authorGetAway <get-away@t-online.de>
Sat, 10 Dec 2016 20:57:09 +0000 (21:57 +0100)
committersvenhoefer <svenhoefer@svenhoefer.com>
Sun, 11 Dec 2016 19:20:22 +0000 (20:20 +0100)
input.c
inputd.c

diff --git a/input.c b/input.c
index 5471bfed0cf47610d20c98ed86b5f916ea06c086..1a9e96d81b1677a953a03d613aa1159428e50a97 100644 (file)
--- a/input.c
+++ b/input.c
@@ -10,7 +10,7 @@
 
 #define NCF_FILE       "/var/tuxbox/config/neutrino.conf"
 #define BUFSIZE        1024
-#define I_VERSION      1.10
+#define I_VERSION      1.11
 
 //#define FONT "/usr/share/fonts/md_khmurabi_10.ttf"
 #define FONT2 "/share/fonts/pakenham.ttf"
index 5a5524aa63d4dc89ea6b5d2dbe696e80dee5e053..24251b8d4d80de18b3ecf17f666e30bce2d79ac1 100644 (file)
--- a/inputd.c
+++ b/inputd.c
@@ -27,6 +27,7 @@ unsigned rc;
 extern int radius;
 char INST_FILE[]="/tmp/rc.locked";
 int instance=0;
+int rclocked=0;
 
 int get_instance(void)
 {
@@ -47,6 +48,10 @@ FILE *fh;
 
        if(pval)
        {
+               if (!rclocked) {
+                       rclocked=1;
+                       system("pzapit -lockrc > /dev/null");
+               }
                if((fh=fopen(INST_FILE,"w"))!=NULL)
                {
                        fputc(pval,fh);
@@ -56,6 +61,7 @@ FILE *fh;
        else
        {
                remove(INST_FILE);
+               system("pzapit -unlockrc > /dev/null");
        }
 }