You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2016/12/21 13:21:56 UTC

qpid-dispatch git commit: DISPATCH-598 - From Ganesh Murthy - On Session-Local-Close, remove qd->pn link pointers to avoid referencing pn_link objects freed by proton. This closes #131

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master b325f6bea -> be75d9cee


DISPATCH-598 - From Ganesh Murthy - On Session-Local-Close, remove qd->pn link pointers to avoid referencing pn_link objects freed by proton.
This closes #131


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

Branch: refs/heads/master
Commit: be75d9cee1c839e3793b2f39d81dce81d2cc4e66
Parents: b325f6b
Author: Ted Ross <tr...@redhat.com>
Authored: Wed Dec 21 08:19:46 2016 -0500
Committer: Ted Ross <tr...@redhat.com>
Committed: Wed Dec 21 08:19:46 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/be75d9ce/src/container.c
----------------------------------------------------------------------
diff --git a/src/container.c b/src/container.c
index b48b17f..5a6d073 100644
--- a/src/container.c
+++ b/src/container.c
@@ -435,6 +435,14 @@ int pn_event_handler(void *handler_context, void *conn_context, pn_event_t *even
         break;
     case PN_SESSION_LOCAL_CLOSE :
         ssn = pn_event_session(event);
+
+        pn_link = pn_link_head(conn, PN_LOCAL_ACTIVE | PN_REMOTE_CLOSED);
+        while (pn_link) {
+                qd_link_t *qd_link = (qd_link_t*) pn_link_get_context(pn_link);
+                qd_link->pn_link = 0;
+                pn_link = pn_link_next(pn_link, PN_LOCAL_ACTIVE | PN_REMOTE_CLOSED);
+        }
+
         if (pn_session_state(ssn) == (PN_LOCAL_CLOSED | PN_REMOTE_CLOSED)) {
             add_session_to_free_list(&qd_conn->free_link_session_list,ssn);
         }


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