mise à jour 13.11.3

Commit 16113852 authored by aleajactaest's avatar aleajactaest
Browse files

update comment

parent 25538433
......@@ -144,6 +144,10 @@ class BitStream():
self.pushChar(x)
#y = ord(x)
#self.internalSerial(y, 8)
def pushArrayChar(self, valeur, size):
' ex.: pushArrayChar([0,1,3,4]) '
for i in valeur:
self.pushChar(i)
# ------------------------------------
def readSerial(self, nbits):
......@@ -272,6 +276,10 @@ class BitStream():
self._read = readBefore
return ret
def getTextMD5(dataRawXml):
for data in dataRawXml:
pass
def Test():
a = BitStream()
a.pushBool(True)
......@@ -1478,6 +1486,8 @@ class ClientNetworkConnection:
self._LatestProbe = 0
self._LastReceivedNumber = 0
self._LastAckInLongAck = 0
self._MsgXmlMD5 = None
self._DatabaseXmlMD5 = None
def cookiesInit(self, UserAddr, UserKey, UserId):
self.UserAddr = UserAddr
......@@ -1581,7 +1591,15 @@ class ClientNetworkConnection:
def disconnect(self):
pass
def EmulateFirst(self):
def EmulateFirst(self, msgRawXml, databaseRawXml):
msgXml = ET.fromstring(msgRawXml)
ET.dump(msgXml)
databaseXml = ET.fromstring(databaseRawXml)
ET.dump(databaseXml)
self._MsgXmlMD5 = getTextMD5(msgRawXml)
self._DatabaseXmlMD5 = getTextMD5(databaseRawXml)
self.log.info("Client Login")
self.sendSystemLogin()
......@@ -1901,13 +1919,9 @@ class ClientKhanat:
self.DownloadMinimum()
self.cFileContainer = CFileContainer()
self.cFileContainer.addSearchPath(self.tempdir.name)
data = self.cFileContainer.getdata("msg.xml").decode()
msgXml = ET.fromstring(data)
ET.dump(msgXml)
data = self.cFileContainer.getdata("database.xml").decode()
databaseXml = ET.fromstring(data)
ET.dump(databaseXml)
self.clientNetworkConnection.EmulateFirst()
msgRawXml = self.cFileContainer.getdata("msg.xml").decode()
databaseRawXml = self.cFileContainer.getdata("database.xml").decode()
self.clientNetworkConnection.EmulateFirst(msgRawXml, databaseRawXml)
def main():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment