X-Git-Url: http://average.org/gitweb/?a=blobdiff_plain;f=gps303%2Ftermconfig.py;h=771f988f038dc6785d7d34a5ff1b1164db476beb;hb=0a3288ad7ed56d995f9e0c15527f1a3af9a6d757;hp=1ab65ce937004f8bfeb5c2c99feef2934b190d76;hpb=602261422a9c34a1ac5ecde75ad87dde7fea6d8c;p=loctrkd.git diff --git a/gps303/termconfig.py b/gps303/termconfig.py index 1ab65ce..771f988 100644 --- a/gps303/termconfig.py +++ b/gps303/termconfig.py @@ -18,11 +18,7 @@ def runserver(conf): zsub = zctx.socket(zmq.SUB) zsub.connect(conf.get("collector", "publishurl")) for protoname in ( - "SUPERVISION", "STATUS", - "RESET", - "WHITELIST_TOTAL", - "PROHIBIT_LBS", "SETUP", "POSITION_UPLOAD_INTERVAL", ): @@ -42,6 +38,10 @@ def runserver(conf): datetime.fromtimestamp(zmsg.when).astimezone(tz=timezone.utc), msg, ) + if msg.RESPOND is not Respond.EXT: + log.error( + "%s does not expect externally provided response", msg + ) kwargs = {} if isinstance(msg, STATUS): kwargs = { @@ -63,7 +63,7 @@ def runserver(conf): ): if key in termconfig: kwargs[key] = termconfig[key] - resp = Resp(imei=zmsg.imei, packet=msg.response(**kwargs)) + resp = Resp(imei=zmsg.imei, packet=msg.Out(**kwargs).packed) log.debug("Response: %s", resp) zpush.send(resp.packed)