Commit 9af251e1 authored by Steve Johnson's avatar Steve Johnson

disable SSDP by default, added cmd line switch and config entry

parent f0bbd4c9
......@@ -42,6 +42,7 @@ for (var dev in ifaces) {
var configPath = './ws2bridge.config';
var useSSL = false;
var useWsLibrary = false; // Fallback library. Does not support SSL.
var useSSDP = false;
// Command line args
for (var index = 2; index < process.argv.length; index++) {
......@@ -58,6 +59,9 @@ for (var index = 2; index < process.argv.length; index++) {
else if (val == "-ssl") {
useSSL = true;
}
else if (val == "-ssdp") {
useSSDP = true;
}
else if (val == "-wslib") {
useWsLibrary = true;
}
......@@ -83,7 +87,11 @@ var config = {};
// TODO: Validate config parameters, esp required.
if (config.useSSL != undefined) {
useSSL = config.useSSL;
useSSL = useSSL | config.useSSL;
}
if (config.useSSDP != undefined) {
useSSDP = useSSDP | config.useSSDP;
}
console.log("config: "+JSON.stringify(config));
......@@ -1418,6 +1426,8 @@ function startup() {
console.log('Server is running on port ' + config.httpPort);
});
// Start the SSDP service
var ssdpServer = new SSDP(serviceType);
if (useSSDP) {
// Start the SSDP service
var ssdpServer = new SSDP(serviceType);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment