From 4e7ea069063935e756e1445f7d81fb268b64ec6a Mon Sep 17 00:00:00 2001 From: citronneur Date: Thu, 20 Nov 2014 22:14:16 +0100 Subject: [PATCH] code refactoring + gitignore updtae --- .gitignore | 5 +++-- rdpy/protocol/rdp/tpkt.py | 7 +++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index b8f27d5..56750d3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,8 @@ .project .pydevproject README.md~ -rdpy/core/tmp/* *.so *.os -.sconsign.dblite +dist/* +build/* +rdpy.egg-info/* diff --git a/rdpy/protocol/rdp/tpkt.py b/rdpy/protocol/rdp/tpkt.py index fb64096..fda5791 100644 --- a/rdpy/protocol/rdp/tpkt.py +++ b/rdpy/protocol/rdp/tpkt.py @@ -76,8 +76,6 @@ class TPKT(RawLayer, IFastPathSender): @param fastPathListener: IFastPathListener """ RawLayer.__init__(self, presentation) - #last packet version read from header - self._lastPacketVersion = UInt8() #length may be coded on more than 1 bytes self._lastShortLength = UInt8() #fast path listener @@ -104,9 +102,10 @@ class TPKT(RawLayer, IFastPathSender): @param data: Stream received from twisted layer """ #first read packet version - data.readType(self._lastPacketVersion) + version = UInt8() + data.readType(version) #classic packet - if self._lastPacketVersion.value == Action.FASTPATH_ACTION_X224: + if version.value == Action.FASTPATH_ACTION_X224: #padding data.readType(UInt8()) #read end header