You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2010/08/11 16:46:39 UTC
svn commit: r984424 - /qpid/trunk/qpid/python/qpid/management.py
Author: kgiusti
Date: Wed Aug 11 14:46:39 2010
New Revision: 984424
URL: http://svn.apache.org/viewvc?rev=984424&view=rev
Log:
Correctly parse replies containing multiple qmf messages.
Modified:
qpid/trunk/qpid/python/qpid/management.py
Modified: qpid/trunk/qpid/python/qpid/management.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/management.py?rev=984424&r1=984423&r2=984424&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/management.py (original)
+++ qpid/trunk/qpid/python/qpid/management.py Wed Aug 11 14:46:39 2010
@@ -376,22 +376,23 @@ class managementClient:
def replyCb (self, ch, msg):
""" Receive messages via the reply queue of a particular channel. """
codec = Codec (msg.body)
- hdr = self.checkHeader (codec)
- if hdr == None:
- return
+ while True:
+ hdr = self.checkHeader (codec)
+ if hdr == None:
+ return
- if hdr[0] == 'm':
- self.handleMethodReply (ch, codec, hdr[1])
- elif hdr[0] == 'z':
- self.handleCommandComplete (ch, codec, hdr[1])
- elif hdr[0] == 'b':
- self.handleBrokerResponse (ch, codec)
- elif hdr[0] == 'p':
- self.handlePackageInd (ch, codec)
- elif hdr[0] == 'q':
- self.handleClassInd (ch, codec)
- else:
- self.parse (ch, codec, hdr[0], hdr[1])
+ if hdr[0] == 'm':
+ self.handleMethodReply (ch, codec, hdr[1])
+ elif hdr[0] == 'z':
+ self.handleCommandComplete (ch, codec, hdr[1])
+ elif hdr[0] == 'b':
+ self.handleBrokerResponse (ch, codec)
+ elif hdr[0] == 'p':
+ self.handlePackageInd (ch, codec)
+ elif hdr[0] == 'q':
+ self.handleClassInd (ch, codec)
+ else:
+ self.parse (ch, codec, hdr[0], hdr[1])
def exceptCb (self, ch, data):
if self.closeCb != None:
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org