You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2009/08/27 18:04:40 UTC

svn commit: r808475 - /qpid/trunk/qpid/python/qpid/messaging.py

Author: rhs
Date: Thu Aug 27 16:04:37 2009
New Revision: 808475

URL: http://svn.apache.org/viewvc?rev=808475&view=rev
Log:
added an assertion to check that credit constraints are not violated, and corrected a bug in a wait condition

Modified:
    qpid/trunk/qpid/python/qpid/messaging.py

Modified: qpid/trunk/qpid/python/qpid/messaging.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/messaging.py?rev=808475&r1=808474&r2=808475&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/messaging.py (original)
+++ qpid/trunk/qpid/python/qpid/messaging.py Thu Aug 27 16:04:37 2009
@@ -701,7 +701,7 @@
     if self._capacity() == 0:
       self.granted = self.returned + 1
       self.wakeup()
-    self.ewait(lambda: self.impending == self.granted)
+    self.ewait(lambda: self.impending >= self.granted)
     msg = self.session._get(self._pred, timeout=timeout)
     if msg is None:
       self.drain = True
@@ -1202,6 +1202,8 @@
     msg = self._decode(m)
     rcv = ssn.receivers[int(cmd.destination)]
     msg._receiver = rcv
+    if rcv.impending is not UNLIMITED:
+      assert rcv.received < rcv.impending
     rcv.received += 1
     log.debug("RECV [%s] %s", ssn, msg)
     ssn.incoming.append(msg)



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org