X-Git-Url: http://www.average.org/gitweb/?a=blobdiff_plain;f=gps303%2Fstorage.py;h=9237871d862a2ca6b4dabc7e466114303fbd9960;hb=80f2fab3fcdf6cd962b0d81f385169dbb7431076;hp=6047c39bfc9686fd0a0643564a10007792209b4e;hpb=3dea189c7bb47f02db07b52fdcda53fdb986fd2b;p=loctrkd.git diff --git a/gps303/storage.py b/gps303/storage.py index 6047c39..9237871 100644 --- a/gps303/storage.py +++ b/gps303/storage.py @@ -30,8 +30,13 @@ def runserver(conf): zmsg = Bcast(zsub.recv()) msg = parse_message(zmsg.packet) log.debug("IMEI %s from %s at %s: %s", zmsg.imei, zmsg.peeraddr, datetime.fromtimestamp(zmsg.when).astimezone(tz=timezone.utc), msg) + if zmsg.peeraddr is not None: + addr, port = zmsg.peeraddr + peeraddr = str(addr), port + else: + peeraddr = None stow( - zmsg.peeraddr, + peeraddr, zmsg.when, zmsg.imei, msg.length,