diff options
author | Ted Ross <tross@apache.org> | 2011-02-04 05:19:43 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2011-02-04 05:19:43 +0000 |
commit | eaa84eeb11e11c41da59844675b13ef1a7aaf198 (patch) | |
tree | 24bd60d18764f821920c743bbf9f55972ad6889a /qpid/cpp/src | |
parent | 4c70dbb3985c54e35fdf722afafcb2456f8b0232 (diff) | |
download | qpid-python-eaa84eeb11e11c41da59844675b13ef1a7aaf198.tar.gz |
Fixed typos in the documentation text.
Fixed bug in the propagation of exceptions in query-processing.
Added user-id to messages sent by the console.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1067087 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r-- | qpid/cpp/src/qmf/Agent.cpp | 10 | ||||
-rw-r--r-- | qpid/cpp/src/qmf/ConsoleSession.cpp | 6 | ||||
-rw-r--r-- | qpid/cpp/src/qmf/ConsoleSessionImpl.h | 1 |
3 files changed, 13 insertions, 4 deletions
diff --git a/qpid/cpp/src/qmf/Agent.cpp b/qpid/cpp/src/qmf/Agent.cpp index 1b7d03968e..8783cfa832 100644 --- a/qpid/cpp/src/qmf/Agent.cpp +++ b/qpid/cpp/src/qmf/Agent.cpp @@ -119,7 +119,9 @@ ConsoleEvent AgentImpl::query(const Query& query, Duration timeout) context->cond.wait(context->lock, qpid::sys::AbsTime(qpid::sys::now(), qpid::sys::Duration(milliseconds * qpid::sys::TIME_MSEC))); - if (context->response.isValid() && context->response.isFinal()) + if (context->response.isValid() && + ((context->response.getType() == CONSOLE_QUERY_RESPONSE && context->response.isFinal()) || + (context->response.getType() == CONSOLE_EXCEPTION))) result = context->response; else { auto_ptr<ConsoleEventImpl> impl(new ConsoleEventImpl(CONSOLE_EXCEPTION)); @@ -520,6 +522,8 @@ void AgentImpl::sendQuery(const Query& query, uint32_t correlator) msg.setReplyTo(session.replyAddress); msg.setCorrelationId(boost::lexical_cast<string>(correlator)); msg.setSubject(directSubject); + if (!session.authUser.empty()) + msg.setUserId(session.authUser); encode(QueryImplAccess::get(query).asMap(), msg); if (sender.isValid()) sender.send(msg); @@ -545,6 +549,8 @@ void AgentImpl::sendMethod(const string& method, const Variant::Map& args, const msg.setReplyTo(session.replyAddress); msg.setCorrelationId(boost::lexical_cast<string>(correlator)); msg.setSubject(directSubject); + if (!session.authUser.empty()) + msg.setUserId(session.authUser); encode(map, msg); if (sender.isValid()) sender.send(msg); @@ -586,6 +592,8 @@ void AgentImpl::sendSchemaRequest(const SchemaId& id) msg.setReplyTo(session.replyAddress); msg.setContent(content); msg.setSubject(directSubject); + if (!session.authUser.empty()) + msg.setUserId(session.authUser); if (sender.isValid()) sender.send(msg); diff --git a/qpid/cpp/src/qmf/ConsoleSession.cpp b/qpid/cpp/src/qmf/ConsoleSession.cpp index 4556c6ab94..bb4458a0b9 100644 --- a/qpid/cpp/src/qmf/ConsoleSession.cpp +++ b/qpid/cpp/src/qmf/ConsoleSession.cpp @@ -65,9 +65,9 @@ Subscription ConsoleSession::subscribe(const string& q, const string& f, const s //======================================================================================== ConsoleSessionImpl::ConsoleSessionImpl(Connection& c, const string& options) : - connection(c), domain("default"), maxAgentAgeMinutes(5), opened(false), - thread(0), threadCanceled(false), - lastVisit(0), lastAgePass(0), connectedBrokerInAgentList(false), schemaCache(new SchemaCache()) + connection(c), domain("default"), authUser(c.getAuthenticatedUsername()), maxAgentAgeMinutes(5), + opened(false), thread(0), threadCanceled(false), lastVisit(0), lastAgePass(0), + connectedBrokerInAgentList(false), schemaCache(new SchemaCache()) { if (!options.empty()) { qpid::messaging::AddressParser parser(options); diff --git a/qpid/cpp/src/qmf/ConsoleSessionImpl.h b/qpid/cpp/src/qmf/ConsoleSessionImpl.h index 675c8bcfb5..e495c1c1e8 100644 --- a/qpid/cpp/src/qmf/ConsoleSessionImpl.h +++ b/qpid/cpp/src/qmf/ConsoleSessionImpl.h @@ -72,6 +72,7 @@ namespace qmf { qpid::messaging::Sender directSender; qpid::messaging::Sender topicSender; std::string domain; + std::string authUser; uint32_t maxAgentAgeMinutes; bool listenOnDirect; bool strictSecurity; |