-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/25418/
-----------------------------------------------------------

Review request for qpid, Gordon Sim and Ted Ross.


Bugs: QPID-6087
    https://issues.apache.org/jira/browse/QPID-6087


Repository: qpid


Description
-------

Trivial fix to have QMF session object name with user ID included.

Session names will be like:

   
org.apache.qpid.broker:session:anonymous@QPID.eab7f84c-3903-4a03-b3b0-4e8f7ab85b86:0
   org.apache.qpid.broker:session:us...@qpid.aaa
   org.apache.qpid.broker:session:us...@qpid.aaa

(the later two are for users specifying session name as "aaa").

Patch itself is trivial, my only concern is if it can't break some naming 
convention, backward compatibility or so.

Another approach would be to put there pointer instead of name, like AMQP 1.0 
does:

    Index: cpp/src/qpid/broker/SessionState.cpp
    ===================================================================
    --- cpp/src/qpid/broker/SessionState.cpp    (revision 1622984)
    +++ cpp/src/qpid/broker/SessionState.cpp    (working copy)
    @@ -69,7 +70,9 @@
         if (parent != 0) {
             ManagementAgent* agent = getBroker().getManagementAgent();
             if (agent != 0) {
    -            std::string name(getId().getName());
    +       std::stringstream ss;
    +       ss << static_cast<const void*>(&(getId()));
    +            std::string name(ss.str());
                 std::string fullName(name);
                 if (name.length() >= std::numeric_limits<uint8_t>::max())
                     name.resize(std::numeric_limits<uint8_t>::max()-1);

This would align AMQP 0-10 session "names" in QMF to 1.0 names, but we would 
loose the information about the real session name one can set in 0-10.


Diffs
-----

  trunk/qpid/cpp/src/qpid/broker/SessionState.cpp 1622984 

Diff: https://reviews.apache.org/r/25418/diff/


Testing
-------


Thanks,

Pavel Moravec

Reply via email to