You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2021/06/03 13:44:57 UTC
[qpid-dispatch] branch main updated: DISPATCH-2158: Move the
removal of connection based link routes before a call to
qdr_core_remove_address. This closes #1236
This is an automated email from the ASF dual-hosted git repository.
gmurthy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/main by this push:
new 5399d27 DISPATCH-2158: Move the removal of connection based link routes before a call to qdr_core_remove_address. This closes #1236
5399d27 is described below
commit 5399d27776807de6071976394cecf9c1e411fd6e
Author: Ganesh Murthy <gm...@apache.org>
AuthorDate: Thu May 27 10:10:27 2021 -0400
DISPATCH-2158: Move the removal of connection based link routes before a call to qdr_core_remove_address. This closes #1236
---
src/router_core/router_core.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/router_core/router_core.c b/src/router_core/router_core.c
index 145063c..1af9e73 100644
--- a/src/router_core/router_core.c
+++ b/src/router_core/router_core.c
@@ -167,6 +167,19 @@ void qdr_core_free(qdr_core_t *core)
qdr_core_delete_link_route(core, link_route);
}
+ //
+ // The connection based link routes need to be removed before we call
+ // qdr_core_remove_address(addr) on all core->addrs
+ //
+ qdr_connection_t *conn = DEQ_HEAD(core->open_connections);
+ while (conn) {
+ while ((link_route = DEQ_HEAD(conn->conn_link_routes))) {
+ DEQ_REMOVE_HEAD(conn->conn_link_routes);
+ qdr_core_delete_link_route(core, link_route);
+ }
+ conn = DEQ_NEXT(conn);
+ }
+
qdr_auto_link_t *auto_link = 0;
while ( (auto_link = DEQ_HEAD(core->auto_links))) {
DEQ_REMOVE_HEAD(core->auto_links);
@@ -277,15 +290,10 @@ void qdr_core_free(qdr_core_t *core)
cleanup = DEQ_HEAD(core->delivery_cleanup_list);
}
- qdr_connection_t *conn = DEQ_HEAD(core->open_connections);
+ conn = DEQ_HEAD(core->open_connections);
while (conn) {
DEQ_REMOVE_HEAD(core->open_connections);
- while ( (link_route = DEQ_HEAD(conn->conn_link_routes))) {
- DEQ_REMOVE_HEAD(conn->conn_link_routes);
- qdr_core_delete_link_route(core, link_route);
- }
-
if (conn->conn_id) {
qdr_del_connection_ref(&conn->conn_id->connection_refs, conn);
qdr_route_check_id_for_deletion_CT(core, conn->conn_id);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org