Commit 028d4287 authored by nextime's avatar nextime

permit to force to not parse arg data in ika packet for "raw" commands

parent 6b23323a
...@@ -305,7 +305,7 @@ class domotikaService(service.Service): ...@@ -305,7 +305,7 @@ class domotikaService(service.Service):
def broadcastTime(self, ipdst="255.255.255.255"): def broadcastTime(self, ipdst="255.255.255.255"):
if self.config.get("general", "timeserver").lower() in ['yes','y','1','true', 'on']: if self.config.get("general", "timeserver").lower() in ['yes','y','1','true', 'on']:
log.debug("Broadcasting Time to "+str(ipdst)) log.debug("Broadcasting Time to "+str(ipdst))
self.sendCommand("SETTIME", arg=struct.pack("<L", int(time.time())), act=C.IKAP_ACT_BOARD, ctx=C.IKAP_CTX_SYSTEM, msgtype=C.IKAP_MSG_ACTION, ipdst=ipdst) self.sendCommand("SETTIME", arg_parse=False, arg=struct.pack("<L", int(time.time())), act=C.IKAP_ACT_BOARD, ctx=C.IKAP_CTX_SYSTEM, msgtype=C.IKAP_MSG_ACTION, ipdst=ipdst)
def initializePlugins(self): def initializePlugins(self):
...@@ -2126,7 +2126,12 @@ class domotikaService(service.Service): ...@@ -2126,7 +2126,12 @@ class domotikaService(service.Service):
def sendCommand(self, *k, **kw): def sendCommand(self, *k, **kw):
if 'arg' in kw.keys(): if 'arg' in kw.keys():
kw['arg']=self.parseDBArg(kw['arg']) if 'arg_parse' in kw.keys():
if not kw['arg_parse']==False:
kw['arg']=self.parseDBArg(kw['arg'])
del kw['arg_parse']
else:
kw['arg']=self.parseDBArg(kw['arg'])
send=False send=False
if str(self.config.get('ikapserver', 'enable')).lower() in ['yes', '1', 'y','true']: if str(self.config.get('ikapserver', 'enable')).lower() in ['yes', '1', 'y','true']:
if self.udp: if self.udp:
......
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