Fix streams decoding in BMProto.bm_command_version()
This commit is contained in:
parent
2a62fb79cc
commit
d15e614bb1
|
@ -512,9 +512,11 @@ class BMProto(AdvancedDispatcher, ObjectTracker):
|
||||||
Incoming version.
|
Incoming version.
|
||||||
Parse and log, remember important things, like streams, bitfields, etc.
|
Parse and log, remember important things, like streams, bitfields, etc.
|
||||||
"""
|
"""
|
||||||
|
decoded = self.decode_payload_content("IQQiiQlslv")
|
||||||
(self.remoteProtocolVersion, self.services, self.timestamp,
|
(self.remoteProtocolVersion, self.services, self.timestamp,
|
||||||
self.sockNode, self.peerNode, self.nonce, self.userAgent,
|
self.sockNode, self.peerNode, self.nonce, self.userAgent
|
||||||
self.streams) = self.decode_payload_content("IQQiiQlsLv")
|
) = decoded[:7]
|
||||||
|
self.streams = decoded[7:]
|
||||||
self.nonce = struct.pack('>Q', self.nonce)
|
self.nonce = struct.pack('>Q', self.nonce)
|
||||||
self.timeOffset = self.timestamp - int(time.time())
|
self.timeOffset = self.timestamp - int(time.time())
|
||||||
logger.debug('remoteProtocolVersion: %i', self.remoteProtocolVersion)
|
logger.debug('remoteProtocolVersion: %i', self.remoteProtocolVersion)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user