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-816 - Check for existence of a connection object before procceding to handle new incoming and outgoing links AMQP_incoming/outgoing_link_handler. The connection that these links belong to might have disappeared at the t
Date Fri, 08 Sep 2017 14:35:43 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 75ebbd13a -> 9d0a684db


DISPATCH-816 - Check for existence of a connection object before procceding to handle new
incoming and outgoing links AMQP_incoming/outgoing_link_handler. The connection that these
links belong to might have disappeared at the time we are ready to handle links and the absence
of the connection must sensed and the link creation process must not proceed.


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

Branch: refs/heads/master
Commit: 9d0a684db2b632690c611b9b05988d3fe3f7ab37
Parents: 75ebbd1
Author: Ganesh Murthy <gmurthy@redhat.com>
Authored: Fri Sep 8 10:35:28 2017 -0400
Committer: Ganesh Murthy <gmurthy@redhat.com>
Committed: Fri Sep 8 10:35:28 2017 -0400

----------------------------------------------------------------------
 src/router_node.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/9d0a684d/src/router_node.c
----------------------------------------------------------------------
diff --git a/src/router_node.c b/src/router_node.c
index 21d52bf..9aa2845 100644
--- a/src/router_node.c
+++ b/src/router_node.c
@@ -514,6 +514,12 @@ static void AMQP_disposition_handler(void* context, qd_link_t *link,
pn_delivery
 static int AMQP_incoming_link_handler(void* context, qd_link_t *link)
 {
     qd_connection_t  *conn     = qd_link_connection(link);
+
+    // The connection that this link belongs to is gone. Perhaps an AMQP close came in.
+    // This link handler should not continue since there is no connection.
+    if (conn == 0)
+        return 0;
+
     qdr_connection_t *qdr_conn = (qdr_connection_t*) qd_connection_get_context(conn);
 
     char *terminus_addr = (char*)pn_terminus_get_address(pn_link_remote_target((pn_link_t
 *)qd_link_pn(link)));
@@ -536,6 +542,12 @@ static int AMQP_incoming_link_handler(void* context, qd_link_t *link)
 static int AMQP_outgoing_link_handler(void* context, qd_link_t *link)
 {
     qd_connection_t  *conn     = qd_link_connection(link);
+
+    // The connection that this link belongs to is gone. Perhaps an AMQP close came in.
+    // This link handler should not continue since there is no connection.
+    if (conn == 0)
+        return 0;
+
     qdr_connection_t *qdr_conn = (qdr_connection_t*) qd_connection_get_context(conn);
 
     char *terminus_addr = (char*)pn_terminus_get_address(pn_link_remote_source((pn_link_t
 *)qd_link_pn(link)));


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


Mime
View raw message