mirror of
https://github.com/naruxde/revpipyload.git
synced 2025-11-08 23:23:52 +01:00
revert: XML-RPC protocol changes
Unfortunately, the changes to the XML-RPC protocol from Commit
f591621614 must be undone. The new
strings cause too many compatibility problems with old clients.
This commit is contained in:
@@ -418,7 +418,7 @@ class RevPiPyLoad:
|
|||||||
self.xsrv.register_function(
|
self.xsrv.register_function(
|
||||||
0, self.xml_mqttrunning, "mqttrunning")
|
0, self.xml_mqttrunning, "mqttrunning")
|
||||||
self.xsrv.register_function(
|
self.xsrv.register_function(
|
||||||
0, self.xml_plcserverrunning, "plcserverrunning")
|
0, self.xml_plcserverrunning, "plcslaverunning")
|
||||||
|
|
||||||
# Erweiterte Funktionen anmelden
|
# Erweiterte Funktionen anmelden
|
||||||
try:
|
try:
|
||||||
@@ -466,9 +466,9 @@ class RevPiPyLoad:
|
|||||||
self.xsrv.register_function(
|
self.xsrv.register_function(
|
||||||
3, self.xml_mqttstop, "mqttstop")
|
3, self.xml_mqttstop, "mqttstop")
|
||||||
self.xsrv.register_function(
|
self.xsrv.register_function(
|
||||||
3, self.xml_plcserverstart, "plcserverstart")
|
3, self.xml_plcserverstart, "plcslavestart")
|
||||||
self.xsrv.register_function(
|
self.xsrv.register_function(
|
||||||
3, self.xml_plcserverstop, "plcserverstop")
|
3, self.xml_plcserverstop, "plcslavestop")
|
||||||
self.xsrv.register_function(
|
self.xsrv.register_function(
|
||||||
3, self.xml_plcdelete_file, "plcdeletefile")
|
3, self.xml_plcdelete_file, "plcdeletefile")
|
||||||
self.xsrv.register_function(
|
self.xsrv.register_function(
|
||||||
@@ -977,11 +977,11 @@ class RevPiPyLoad:
|
|||||||
dc["mqttwrite_outputs"] = int(self.mqttwrite_outputs)
|
dc["mqttwrite_outputs"] = int(self.mqttwrite_outputs)
|
||||||
|
|
||||||
# PLCSERVER Sektion
|
# PLCSERVER Sektion
|
||||||
dc["plcserver"] = int(self.plcserver)
|
dc["plcslave"] = int(self.plcserver)
|
||||||
dc["plcserveracl"] = self.plcserveracl.acl
|
dc["plcslaveacl"] = self.plcserveracl.acl
|
||||||
dc["plcserverbindip"] = self.plcserverbindip
|
dc["plcslavebindip"] = self.plcserverbindip
|
||||||
dc["plcserverport"] = self.plcserverport
|
dc["plcslaveport"] = self.plcserverport
|
||||||
dc["plcserverwatchdog"] = int(self.plcwatchdog)
|
dc["plcslavewatchdog"] = int(self.plcwatchdog)
|
||||||
|
|
||||||
# XMLRPC Sektion
|
# XMLRPC Sektion
|
||||||
dc["xmlrpc"] = int(self.xmlrpc)
|
dc["xmlrpc"] = int(self.xmlrpc)
|
||||||
@@ -1286,6 +1286,17 @@ class RevPiPyLoad:
|
|||||||
dc["replace_ios"] = os.path.join(
|
dc["replace_ios"] = os.path.join(
|
||||||
self.plcworkdir, dc["replace_ios"])
|
self.plcworkdir, dc["replace_ios"])
|
||||||
|
|
||||||
|
# Rename values due to compatibility with the xml-rpc protocol
|
||||||
|
for key_from, key_to in (
|
||||||
|
("plcslave", "plcserver"),
|
||||||
|
("plcslaveacl", "plcserveracl"),
|
||||||
|
("plcslavebindip", "plcserverbindip"),
|
||||||
|
("plcslaveport", "plcserverport"),
|
||||||
|
("plcslavewatchdog", "plcserverwatchdog"),
|
||||||
|
):
|
||||||
|
dc[key_to] = dc[key_from]
|
||||||
|
del dc[key_from]
|
||||||
|
|
||||||
# Werte übernehmen, die eine Definition in key haben (andere nicht)
|
# Werte übernehmen, die eine Definition in key haben (andere nicht)
|
||||||
for sektion in keys:
|
for sektion in keys:
|
||||||
suffix = sektion.lower()
|
suffix = sektion.lower()
|
||||||
@@ -1300,6 +1311,8 @@ class RevPiPyLoad:
|
|||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
if localkey != "acl":
|
if localkey != "acl":
|
||||||
|
if sektion not in self.globalconfig:
|
||||||
|
self.globalconfig.add_section(sektion)
|
||||||
self.globalconfig.set(
|
self.globalconfig.set(
|
||||||
sektion,
|
sektion,
|
||||||
key if localkey == "" else localkey,
|
key if localkey == "" else localkey,
|
||||||
|
|||||||
Reference in New Issue
Block a user