diff options
| author | Alan Conway <aconway@apache.org> | 2009-03-06 14:22:50 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-03-06 14:22:50 +0000 |
| commit | a8f0c5e57355e5209fb16c13197e28e08d6aecc0 (patch) | |
| tree | 99375e07dfdd2d33a15aeccf627e3a7af6420d28 /qpid/cpp | |
| parent | 054d0f035177e755539022ef3b2124e8cd250f8f (diff) | |
| download | qpid-python-a8f0c5e57355e5209fb16c13197e28e08d6aecc0.tar.gz | |
AclPlugin: Use --acl-file unmodified if --no-data-dir.
SessionId: print as userid.sessionid rather than sessionid@userid.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@750913 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/src/qpid/SessionId.cpp | 2 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/acl/AclPlugin.cpp | 13 |
2 files changed, 5 insertions, 10 deletions
diff --git a/qpid/cpp/src/qpid/SessionId.cpp b/qpid/cpp/src/qpid/SessionId.cpp index fce6619f5d..098998015f 100644 --- a/qpid/cpp/src/qpid/SessionId.cpp +++ b/qpid/cpp/src/qpid/SessionId.cpp @@ -35,7 +35,7 @@ bool SessionId::operator==(const SessionId& id) const { } std::ostream& operator<<(std::ostream& o, const SessionId& id) { - return o << id.getName() << "@" << id.getUserId(); + return o << id.getUserId() << "." << id.getName(); } std::string SessionId::str() const { diff --git a/qpid/cpp/src/qpid/acl/AclPlugin.cpp b/qpid/cpp/src/qpid/acl/AclPlugin.cpp index 7310139041..4c6efa19dd 100644 --- a/qpid/cpp/src/qpid/acl/AclPlugin.cpp +++ b/qpid/cpp/src/qpid/acl/AclPlugin.cpp @@ -62,15 +62,10 @@ struct AclPlugin : public Plugin { if (acl) throw Exception("ACL plugin cannot be initialized twice in one process."); - if (values.aclFile.at(0) == '/') - { - values.aclFile = values.aclFile; - } - else - { - std::ostringstream oss; - oss << b.getDataDir().getPath() << "/" << values.aclFile; - values.aclFile = oss.str(); + if (values.aclFile.at(0) != '/' && !b.getDataDir().getPath().empty()) { + std::ostringstream oss; + oss << b.getDataDir().getPath() << "/" << values.aclFile; + values.aclFile = oss.str(); } acl = new Acl(values, b); |
