Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 93c89a758 -> db87d5d3e


DISPATCH-1207: create multiple sessions with same ID over single connection


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/db87d5d3
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/db87d5d3
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/db87d5d3

Branch: refs/heads/master
Commit: db87d5d3e7191b17af0804f741f8817e2eddb529
Parents: 93c89a7
Author: Chuck Rolke <[email protected]>
Authored: Mon Dec 3 17:33:16 2018 -0500
Committer: Chuck Rolke <[email protected]>
Committed: Mon Dec 3 17:33:16 2018 -0500

----------------------------------------------------------------------
 tools/scraper/amqp_detail.py | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/db87d5d3/tools/scraper/amqp_detail.py
----------------------------------------------------------------------
diff --git a/tools/scraper/amqp_detail.py b/tools/scraper/amqp_detail.py
index 042a19b..72da87f 100755
--- a/tools/scraper/amqp_detail.py
+++ b/tools/scraper/amqp_detail.py
@@ -126,6 +126,8 @@ class SessionDetail:
         self.channel = -1
         self.peer_chan = -1
 
+        self.half_closed = False
+
         self.direction = ""
 
         # seq_no number differentiates items that otherwise have same 
identifiers.
@@ -424,7 +426,9 @@ class AllDetails():
                     conn_details.unaccounted_frame_list.append(plf)
                     continue
                 # session required
-                channel = plf.data.channel
+                channel = plf.data.channel # For incoming begin this is the 
remote channel
+                                           # For outgoing begin this is the 
local channel
+                                           # Assume they are the same for the 
time being
                 sess_details = conn_details.FindSession(channel)
                 if sess_details == None:
                     sess_details = SessionDetail(conn_details, 
conn_details.GetSeqNo(), plf.datetime)
@@ -437,7 +441,15 @@ class AllDetails():
                     sess_details.amqp_errors += 1
 
                 if pname in ['begin', 'end', 'disposition']:
-                    sess_details.session_frame_list.append(plf)
+                    sess_details.session_frame_list.append(plf) # Accumulate 
to current session
+                    if pname == 'end':
+                        # end is closing this session
+                        if sess_details.half_closed:
+                            conn_details.EndChannel(plf.data.channel)
+                        else:
+                            sess_details.half_closed = True
+                    else:
+                        pass # begin handled above; disposition needs no action
 
                 elif pname in ['attach']:
                     handle = plf.data.handle  # proton local handle


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to