summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2010-03-26 23:18:59 +0000
committerTed Ross <tross@apache.org>2010-03-26 23:18:59 +0000
commit21bd3b1afb6b04a0ee61d15c8f3604313b2357bb (patch)
tree8c375e92be843c0803c87becf93fde0f88e700ee
parentbb582d2e1c91e973ac8e419b497bf165d9530f29 (diff)
downloadqpid-python-21bd3b1afb6b04a0ee61d15c8f3604313b2357bb.tar.gz
Fixed a bug preventing reception of unsolicited messages from the broker.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qmf-devel0.7a@928097 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/extras/qmf/src/py/qmf/console.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/qpid/extras/qmf/src/py/qmf/console.py b/qpid/extras/qmf/src/py/qmf/console.py
index 1f88cdb70a..2420b715a0 100644
--- a/qpid/extras/qmf/src/py/qmf/console.py
+++ b/qpid/extras/qmf/src/py/qmf/console.py
@@ -2086,7 +2086,7 @@ class Broker:
if len(items) >= 4:
if items[0] == 'console' and items[3].isdigit():
agent_addr = int(items[3]) # The QMFv1 Agent Bank
- if agent_addr and agent_addr in self.agents:
+ if agent_addr != None and agent_addr in self.agents:
agent = self.agents[agent_addr]
codec = Codec(msg.body)
@@ -2394,13 +2394,11 @@ class Agent:
self.console.methodResponse(broker, seq, result)
- def _v1HandleEventInd(self, broker, codec, seq):
+ def _v1HandleEventInd(self, codec, seq):
"""
Handle a QMFv1 event indication
"""
- if self.console != None:
- event = Event(self, broker, codec)
- self.console.event(broker, event)
+ pass
def _v1HandleContentInd(self, codec, sequence, prop=False, stat=False):
@@ -2416,6 +2414,7 @@ class Agent:
if classKey.getPackageName() == "org.apache.qpid.broker" and classKey.getClassName() == "agent" and prop:
self.broker._updateAgent(obj)
+ context = self.unsolicitedContext
try:
self.lock.acquire()
if sequence in self.contextMap:
@@ -2423,8 +2422,6 @@ class Agent:
finally:
self.lock.release()
- if not context:
- context = self.unsolicitedContext
context.addV1QueryResult(obj)
@@ -2596,7 +2593,7 @@ class RequestContext(object):
def addV1QueryResult(self, data):
if self.notifiable:
- self.notifyable(qmf_object=data)
+ self.notifiable(qmf_object=data)
else:
self.queryResults.append(data)