add layer mode

This commit is contained in:
citronneur@gmail.com
2014-02-10 22:13:55 +01:00
parent ec971361c1
commit 0679936532
3 changed files with 3 additions and 3 deletions

View File

@@ -74,7 +74,7 @@ class Type(object):
self.__read__(s)
#check constant value
if self._constant and old != self:
raise InvalidExpectedDataException("const value expected")
raise InvalidExpectedDataException("%s const value expected %s != %s"%(self.__class__, old.value, self.value))
def __read__(self, s):
'''

View File

@@ -51,7 +51,7 @@ class MCS(LayerAutomata):
ctor call base class ctor
@param presentation: presentation layer
'''
LayerAutomata.__init__(self, presentation)
LayerAutomata.__init__(self, presentation._mode, presentation)
self._clientSettings = gcc.ClientSettings()
self._serverSettings = gcc.ServerSettings()
#default user Id

View File

@@ -13,7 +13,7 @@ class TPKT(RawLayer):
#first byte of classic tpkt header
TPKT_PACKET = UInt8(3)
def __init__(self, presentation = None):
def __init__(self, presentation):
'''
Constructor
'''