From f6678aa45298269d4b251834cf9d72490d746c39 Mon Sep 17 00:00:00 2001 From: Ralph Metzler Date: Wed, 13 Jul 2016 00:30:35 +0200 Subject: [PATCH] if /config/msmode does not exist, fall back to old behavior --- octoserve/octoserve.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/octoserve/octoserve.c b/octoserve/octoserve.c index 174f2e8..273945d 100644 --- a/octoserve/octoserve.c +++ b/octoserve/octoserve.c @@ -2784,8 +2784,12 @@ static int read_msmode(char *fn) char mode[80]; fd = open(fn, O_RDONLY); - if (fd < 0) - return 0; + if (fd < 0) { + if (fexists("/config/noswitch.enabled")) + return 0; + else + return 1; + } len = read(fd, mode, 7); if (len < 0) return 0; @@ -2864,10 +2868,7 @@ int main(int argc, char **argv) } if (fexists("/config/nodms.enabled")) nodms = 1; - if (fexists("/config/noswitch.enabled")) - msmode = 0; - else - msmode = read_msmode("/config/msmode"); + msmode = read_msmode("/config/msmode"); if (fexists("/config/nodvbt.enabled")) nodvbt = 1; if (fexists("/config/vlan.enabled")) {