Commit 5b1b9b66 authored by Aurel's avatar Aurel

explicitly tell oid is lenght of 8

fix decode for askStoreObject


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@110 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 7f7b107a
...@@ -536,7 +536,8 @@ class Packet(object): ...@@ -536,7 +536,8 @@ class Packet(object):
body.append(user) body.append(user)
body.append(desc) body.append(desc)
body.append(ext) body.append(ext)
body.expend(oid_list) for oid in oid_list:
body.append(pack('8s', oid))
self._body = ''.join(body) self._body = ''.join(body)
return self return self
...@@ -955,8 +956,8 @@ class Packet(object): ...@@ -955,8 +956,8 @@ class Packet(object):
def _decodeAskStoreObject(self): def _decodeAskStoreObject(self):
try: try:
oid, serial, tid, compression, checksum, data_len \ oid, serial, tid, compression, checksum, data_len \
= unpack('!8s8s8sBLL', self._body[:25]) = unpack('!8s8s8sBLL', self._body[:33])
data = self._body[25:] data = self._body[33:]
except: except:
raise ProtocolError(self, 'invalid ask store object') raise ProtocolError(self, 'invalid ask store object')
if data_len != len(data): if data_len != len(data):
......
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