diff --git a/dpnet/netserver.py b/dpnet/netserver.py index 9e4f505..e13efea 100644 --- a/dpnet/netserver.py +++ b/dpnet/netserver.py @@ -210,7 +210,7 @@ class Netserver(asyncio.DatagramProtocol): sack_sent = True if not session.next_send == cframe.NRecv: - logger.error("Received CFRAME (%s) does not have same NRcv (%s). One sent packet might have been lost.", cframe.NRecv, session.CFRAME_NRcv) + logger.error("Received CFRAME (%s) does not have same NRcv (%s). One sent packet might have been lost.", cframe.NRecv, session.next_send) if not sack_sent: session.send_cframe_sack() sack_sent = True @@ -227,7 +227,7 @@ class Netserver(asyncio.DatagramProtocol): return #logger.debug("Got a CFrame POLL. Replying with a SACK.") # must send back a ACK - #session.send_cframe_sack() + session.send_cframe_sack() except Exception: logger.error("Should have been a CFRAME but could not parse it") traceback.print_exc() @@ -380,7 +380,8 @@ class Netserver(asyncio.DatagramProtocol): player.session.send_gamedata(b'\x2f\x02\x00\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00', acknow=True) # unknown """ else: - logger.debug("OPCODE: %s VALUES: %s", payload[0], payload[1:]) + logger.debug("OPCODE: %s VALUES: %s", struct.pack("