Skip to content
Snippets Groups Projects
Commit 14c98811 authored by ree's avatar ree
Browse files

Fix for Mindless Automaton:

Allow for the socket policy service to have a custom section name (for
example [Socket-Policy] instead of the previously required [FlashPolicy])

This only works if the default port of 843 is used.  For non-standard ports,
the section must still be named [FlashPolicy]
parent f51f3a62
No related branches found
No related tags found
No related merge requests found
......@@ -74,10 +74,19 @@ function GetServicesIniValues() {
try {
var f = new File(file_cfgname(system.ctrl_dir, "services.ini"));
if (f.open("r", true)) {
FFlashSocketPolicyServiceEnabled = f.iniGetValue("FlashPolicy", "Enabled", true);
FFlashSocketPolicyServicePort = f.iniGetValue("FlashPolicy", "Port", -1);
// Override the Enabled flag if we don't have a port
if (FFlashSocketPolicyServicePort === -1) FFlashSocketPolicyServiceEnabled = false;
FFlashSocketPolicyServicePort = f.iniGetValue("FlashPolicy", "Port", -1);
if (FFlashSocketPolicyServicePort === -1) {
var Sections = f.iniGetSections();
for (var i = 0; i < Sections.length; i++) {
if (f.iniGetValue(Sections[i], "Port", -1) === 843) {
FFlashSocketPolicyServicePort = 843;
FFlashSocketPolicyServiceEnabled = f.iniGetValue(Sections[i], "Enabled", true);
if (FFlashSocketPolicyServiceEnabled) break;
}
}
} else {
FFlashSocketPolicyServiceEnabled = f.iniGetValue("FlashPolicy", "Enabled", true);
}
f.close();
}
} catch (err) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment