summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2010-07-22 21:57:37 +0000
committerTed Ross <tross@apache.org>2010-07-22 21:57:37 +0000
commita621976b2626148ad00b4909198d9c9d6ae9426d (patch)
tree6c7042a322560619e21627cf277a3124d0d7b297 /cpp
parentfd4b59dff2ed6f050af6effd28d2c7a02351bf07 (diff)
downloadqpid-python-a621976b2626148ad00b4909198d9c9d6ae9426d.tar.gz
Bugfix: agent label in wrapped (python, ruby) qmf agent was not transmitted to the
consoles. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@966871 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rwxr-xr-xcpp/bindings/qmf/tests/agent_ruby.rb2
-rw-r--r--cpp/bindings/qmf/tests/python_agent.py2
-rwxr-xr-xcpp/bindings/qmf/tests/ruby_console_test.rb2
-rw-r--r--cpp/src/qmf/engine/Agent.cpp4
4 files changed, 5 insertions, 5 deletions
diff --git a/cpp/bindings/qmf/tests/agent_ruby.rb b/cpp/bindings/qmf/tests/agent_ruby.rb
index 903e2dfc71..5ee5e371d3 100755
--- a/cpp/bindings/qmf/tests/agent_ruby.rb
+++ b/cpp/bindings/qmf/tests/agent_ruby.rb
@@ -231,7 +231,7 @@ class App < Qmf::AgentHandler
@settings.set_attr("host", ARGV[0]) if ARGV.size > 0
@settings.set_attr("port", ARGV[1].to_i) if ARGV.size > 1
@connection = Qmf::Connection.new(@settings)
- @agent = Qmf::Agent.new(self)
+ @agent = Qmf::Agent.new(self, "agent_test_label")
@model = Model.new
@model.register(@agent)
diff --git a/cpp/bindings/qmf/tests/python_agent.py b/cpp/bindings/qmf/tests/python_agent.py
index e22c80a813..28ba47e1bb 100644
--- a/cpp/bindings/qmf/tests/python_agent.py
+++ b/cpp/bindings/qmf/tests/python_agent.py
@@ -263,7 +263,7 @@ class App(qmf.AgentHandler):
self._connection = qmf.Connection(self._settings)
# Instantiate an Agent to serve me queries and method calls
- self._agent = qmf.Agent(self)
+ self._agent = qmf.Agent(self, "agent_test_label")
# Dynamically define the parent and child schemas, then
# register them with the agent
diff --git a/cpp/bindings/qmf/tests/ruby_console_test.rb b/cpp/bindings/qmf/tests/ruby_console_test.rb
index 4d65afa79d..dd495603eb 100755
--- a/cpp/bindings/qmf/tests/ruby_console_test.rb
+++ b/cpp/bindings/qmf/tests/ruby_console_test.rb
@@ -204,7 +204,7 @@ class ConsoleTest < ConsoleTestBase
def test_D_get_with_agent
agents = @qmfc.agents
agents.each do |agent|
- if agent.label == "qmfa"
+ if agent.label == "agent_test_label"
parent = @qmfc.object(:class => "parent", :agent => agent)
assert(parent, "Number of parent objects")
return
diff --git a/cpp/src/qmf/engine/Agent.cpp b/cpp/src/qmf/engine/Agent.cpp
index 64c5961385..067f53471f 100644
--- a/cpp/src/qmf/engine/Agent.cpp
+++ b/cpp/src/qmf/engine/Agent.cpp
@@ -238,7 +238,7 @@ AgentImpl::AgentImpl(char* _label, bool i) :
assignedBrokerBank(0), assignedAgentBank(0),
bootSequence(1), nextObjectId(1), nextContextNum(1), attachComplete(false)
{
- queueName += label;
+ queueName += Uuid(true).str();
}
AgentImpl::~AgentImpl()
@@ -334,7 +334,7 @@ void AgentImpl::startProtocol()
Buffer buffer(rawbuffer, 512);
Protocol::encodeHeader(buffer, Protocol::OP_ATTACH_REQUEST);
- buffer.putShortString("qmfa");
+ buffer.putShortString(label);
systemId.encode(buffer);
buffer.putLong(requestedBrokerBank);
buffer.putLong(requestedAgentBank);