Permit proxy only and to avoid mapping zone names

parent e8e2d808
......@@ -5,7 +5,9 @@ baudrate: 9600
enableTCPProxy: no
tcpport: 10001
tcpaddr: 127.0.0.1
proxyonly: no
[panel]
autodetect: yes
paneltype: MG5050
mapNames: yes
......@@ -161,9 +161,10 @@ class ParadoxProtocol(BaseProtocol):
self.log.debug("Connection lost for "+str(reason))
def connect(self):
self.write(p37b.MSG_CONNECT, expected_reply=p37b.REPLY_CONNECT)
self.write(p37b.MSG_GETSTATUS, expected_reply=p37b.REPLY_GETSTATUS)
self.write(p37b.MSG_SYNC, self._replySync, expected_reply=p37b.REPLY_SYNC)
if not genutils.isTrue(self.cfg.get('connection', 'proxyonly')):
self.write(p37b.MSG_CONNECT, expected_reply=p37b.REPLY_CONNECT)
self.write(p37b.MSG_GETSTATUS, expected_reply=p37b.REPLY_GETSTATUS)
self.write(p37b.MSG_SYNC, self._replySync, expected_reply=p37b.REPLY_SYNC)
def write(self, message, reply_callback=False, expected_reply=False):
......@@ -182,13 +183,19 @@ class ParadoxProtocol(BaseProtocol):
# when connecting. So, we just send both, hope
# sometime i will fully understand what they do exactly.
self.write(p37b.MSG_UNKWNOWN_HS1)
self.write(p37b.MSG_UNKWNOWN_HS2)
self.write(p37b.MSG_UNKWNOWN_HS2, self.mapNames)
def _processEvent(self, event):
pass
def mapNames(self, reply=None):
if genutils.isTrue(self.cfg.get('connection', 'mapNames'):
pass
class ParadoxTCPProxy(Protocol):
cid = 0
......
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