qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmur...@apache.org
Subject qpid-dispatch git commit: DISPATCH-1022 - Zeroed out pn_link references on qd_links before closing session locally so no activities can happen on those links
Date Mon, 04 Jun 2018 19:14:28 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master c38f99e2a -> 43b3b2e03


DISPATCH-1022 - Zeroed out pn_link references on qd_links before closing session locally so
no activities can happen on those links


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

Branch: refs/heads/master
Commit: 43b3b2e03c182e4bffd33a96daa3a911dd4132ea
Parents: c38f99e
Author: Ganesh Murthy <gmurthy@redhat.com>
Authored: Mon Jun 4 15:07:48 2018 -0400
Committer: Ganesh Murthy <gmurthy@redhat.com>
Committed: Mon Jun 4 15:07:48 2018 -0400

----------------------------------------------------------------------
 src/container.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/43b3b2e0/src/container.c
----------------------------------------------------------------------
diff --git a/src/container.c b/src/container.c
index 1f2b8f0..a70e5a1 100644
--- a/src/container.c
+++ b/src/container.c
@@ -444,6 +444,17 @@ void qd_container_handle_event(qd_container_t *container, pn_event_t
*event)
                 if (qd_conn->policy_settings) {
                     qd_conn->n_sessions--;
                 }
+
+                pn_link = pn_link_head(conn, PN_LOCAL_ACTIVE | PN_REMOTE_CLOSED);
+                while (pn_link) {
+                    if (pn_link_session(pn_link) == ssn) {
+                        qd_link_t *qd_link = (qd_link_t*) pn_link_get_context(pn_link);
+                        if (qd_link)
+                            qd_link->pn_link = 0;
+                    }
+                    pn_link = pn_link_next(pn_link, PN_LOCAL_ACTIVE | PN_REMOTE_CLOSED);
+                }
+
                 pn_session_close(ssn);
             }
             else if (pn_session_state(ssn) == (PN_LOCAL_CLOSED | PN_REMOTE_CLOSED)) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message