From: GetAway Date: Sat, 10 Dec 2016 20:57:09 +0000 (+0100) Subject: use new pzapit to lock & unlock RC X-Git-Url: https://git.webhop.me/?a=commitdiff_plain;h=909dc23f8247d37550dab8f52593c6bc3b04584d;p=input.git use new pzapit to lock & unlock RC --- diff --git a/input.c b/input.c index 5471bfe..1a9e96d 100644 --- 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" diff --git a/inputd.c b/inputd.c index 5a5524a..24251b8 100644 --- 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"); } }