summaryrefslogtreecommitdiff
path: root/python/qpid/codec010.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-04-14 16:33:40 +0000
committerRafael H. Schloming <rhs@apache.org>2008-04-14 16:33:40 +0000
commitdcaa8582a323d445fee5fdb46a25f2bcf3f89d58 (patch)
tree704707ca645bddcc720e17be981a965bc1d0c57f /python/qpid/codec010.py
parent88fd894652067d48d9b1988d36ee081ae46f365f (diff)
downloadqpid-python-dcaa8582a323d445fee5fdb46a25f2bcf3f89d58.tar.gz
fixed encode/decode of structs in command/control arguments to include the type code when specified
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@647887 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/codec010.py')
-rw-r--r--python/qpid/codec010.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/qpid/codec010.py b/python/qpid/codec010.py
index 0e4244fb75..f82a7a49dc 100644
--- a/python/qpid/codec010.py
+++ b/python/qpid/codec010.py
@@ -195,21 +195,21 @@ class Codec(Packer):
def read_control(self):
cntrl = self.spec.controls[self.read_uint16()]
- return cntrl.decode(self)
+ return Struct(cntrl, **cntrl.decode_fields(self))
def write_control(self, ctrl):
type = ctrl._type
self.write_uint16(type.code)
- type.encode(self, ctrl)
+ type.encode_fields(self, ctrl)
def read_command(self):
type = self.spec.commands[self.read_uint16()]
hdr = self.spec["session.header"].decode(self)
- cmd = type.decode(self)
+ cmd = Struct(type, **type.decode_fields(self))
return hdr, cmd
def write_command(self, hdr, cmd):
self.write_uint16(cmd._type.code)
hdr._type.encode(self, hdr)
- cmd._type.encode(self, cmd)
+ cmd._type.encode_fields(self, cmd)
def read_size(self, width):
if width > 0: