]> git.vomp.tv Git - vompserver.git/commitdiff
Patch to allow disabling of mvprelay server
authorChris Tallon <chris@vomp.tv>
Wed, 26 Mar 2008 16:14:19 +0000 (16:14 +0000)
committerChris Tallon <chris@vomp.tv>
Wed, 26 Mar 2008 16:14:19 +0000 (16:14 +0000)
mvpserver.c
vomp.conf.sample

index a1aea2cb7c49f8105ab51907c543beb380df0929..d6a888b568d6e71bdec9f15d4ff86bf700aa7ad1 100644 (file)
@@ -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())
   {
index 722c1af9a272d5a3a2affa234d7368cb17a4da5e..e83756abc094023b2fbd4cf1777076b204ff1c19 100644 (file)
@@ -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
+