From 6c97a526231532a102049f667da1796a081d0bc7 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Wed, 26 Mar 2008 16:14:19 +0000 Subject: [PATCH] Patch to allow disabling of mvprelay server --- mvpserver.c | 24 ++++++++++++++++++------ vomp.conf.sample | 6 ++++++ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/mvpserver.c b/mvpserver.c index a1aea2c..d6a888b 100644 --- a/mvpserver.c +++ b/mvpserver.c @@ -122,6 +122,7 @@ int MVPServer::run(char* tconfigDir) char* configString; int bootpEnabled = 0; int tftpEnabled = 0; + int mvprelayEnabled = 1; configString = config.getValueString("General", "Bootp server enabled"); if (configString && (!strcasecmp(configString, "yes"))) bootpEnabled = 1; @@ -131,6 +132,10 @@ int MVPServer::run(char* tconfigDir) if (configString && (!strcasecmp(configString, "yes"))) tftpEnabled = 1; if (configString) delete[] configString; + configString = config.getValueString("General", "MVPRelay enabled"); + if (configString && (strcasecmp(configString, "yes"))) mvprelayEnabled = 0; + if (configString) delete[] configString; + if (bootpEnabled) { @@ -189,17 +194,24 @@ int MVPServer::run(char* tconfigDir) } // Start mvprelay thread - if (!mvprelay.run()) + if (mvprelayEnabled) { - log.log("Main", Log::CRIT, "Could not start MVPRelay"); - stop(); - return 0; + if (!mvprelay.run()) + { + log.log("Main", Log::CRIT, "Could not start MVPRelay"); + stop(); + return 0; + } + else + { + log.log("Main", Log::INFO, "MVPRelay started"); + } } else { - log.log("Main", Log::INFO, "MVPRelay started"); + log.log("Main", Log::INFO, "Not starting MVPRelay"); } - + // start thread here if (!threadStart()) { diff --git a/vomp.conf.sample b/vomp.conf.sample index 722c1af..e83756a 100644 --- a/vomp.conf.sample +++ b/vomp.conf.sample @@ -28,3 +28,9 @@ ## path will be used - i.e. where this file is # TFTP directory = /tftpboot + +## Change the following to "no" to disable the +## built in mvprelay server + +# MVPRelay enabled = yes + -- 2.39.2