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/04/25 20:59:43 UTC

qpid-dispatch git commit: DISPATCH_294 - Make sure _all_ links are properly cleaned up when a connection is lost.

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 9c8e4a24a -> fc392d7cc


DISPATCH_294 - Make sure _all_ links are properly cleaned up when a connection is lost.


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

Branch: refs/heads/master
Commit: fc392d7cca174ac55ad80ca8a96000db4aeb2772
Parents: 9c8e4a2
Author: Ted Ross <tr...@redhat.com>
Authored: Mon Apr 25 14:50:14 2016 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Mon Apr 25 14:58:40 2016 -0400

----------------------------------------------------------------------
 src/container.c               | 6 +++---
 src/router_core/connections.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/fc392d7c/src/container.c
----------------------------------------------------------------------
diff --git a/src/container.c b/src/container.c
index 86f8413..9eabed5 100644
--- a/src/container.c
+++ b/src/container.c
@@ -306,7 +306,7 @@ static int close_handler(qd_container_t *container, void* conn_context, pn_conne
     // Close all links, passing QD_LOST as the reason.  These links are not
     // being properly 'detached'.  They are being orphaned.
     //
-    pn_link_t *pn_link = pn_link_head(conn, PN_LOCAL_ACTIVE);
+    pn_link_t *pn_link = pn_link_head(conn, 0);
     while (pn_link) {
         qd_link_t *link = (qd_link_t*) pn_link_get_context(pn_link);
         if (link) {
@@ -316,7 +316,7 @@ static int close_handler(qd_container_t *container, void* conn_context, pn_conne
             }
         }
         pn_link_close(pn_link);
-        pn_link = pn_link_next(pn_link, PN_LOCAL_ACTIVE);
+        pn_link = pn_link_next(pn_link, 0);
     }
 
     // teardown all sessions
@@ -414,7 +414,7 @@ int pn_event_handler(void *handler_context, void *conn_context, pn_event_t *even
             pn_link_t *pn_link = pn_link_head(conn, PN_LOCAL_ACTIVE | PN_REMOTE_ACTIVE);
             while (pn_link) {
                 if (pn_link_session(pn_link) == ssn) {
-                    qd_link_t *qd_link = (qd_link_t *)pn_link_get_context(pn_link);
+                    qd_link_t *qd_link = (qd_link_t*) pn_link_get_context(pn_link);
                     if (qd_link && qd_link->node) {
                         if (qd_conn->policy_settings) {
                             if (qd_link->direction == QD_OUTGOING) {

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/fc392d7c/src/router_core/connections.c
----------------------------------------------------------------------
diff --git a/src/router_core/connections.c b/src/router_core/connections.c
index b53d157..e762a85 100644
--- a/src/router_core/connections.c
+++ b/src/router_core/connections.c
@@ -416,7 +416,7 @@ static void qdr_generate_link_name(const char *label, char *buffer, size_t lengt
 static void qdr_link_cleanup_CT(qdr_core_t *core, qdr_connection_t *conn, qdr_link_t *link)
 {
     //
-    // Remove the link from the master list links
+    // Remove the link from the master list of links
     //
     DEQ_REMOVE(core->open_links, link);
 


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