Repository: qpid-dispatch Updated Branches: refs/heads/1.1.x 1a2bde109 -> c6fac91d5
DISPATCH-983: take snapshot of current links with work when copying connection work Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/57fbce9e Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/57fbce9e Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/57fbce9e Branch: refs/heads/1.1.x Commit: 57fbce9e8c831a36998d0be417b8d98f205f9493 Parents: 1a2bde1 Author: Gordon Sim <[email protected]> Authored: Mon Apr 30 20:44:02 2018 +0100 Committer: Ganesh Murthy <[email protected]> Committed: Tue May 1 09:18:19 2018 -0400 ---------------------------------------------------------------------- src/router_core/connections.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/57fbce9e/src/router_core/connections.c ---------------------------------------------------------------------- diff --git a/src/router_core/connections.c b/src/router_core/connections.c index 4598312..9608d79 100644 --- a/src/router_core/connections.c +++ b/src/router_core/connections.c @@ -205,6 +205,7 @@ const char *qdr_connection_get_tenant_space(const qdr_connection_t *conn, int *l int qdr_connection_process(qdr_connection_t *conn) { qdr_connection_work_list_t work_list; + qdr_link_ref_list_t links_with_work; qdr_core_t *core = conn->core; qdr_link_ref_t *ref; @@ -215,6 +216,7 @@ int qdr_connection_process(qdr_connection_t *conn) sys_mutex_lock(conn->work_lock); DEQ_MOVE(conn->work_list, work_list); + DEQ_MOVE(conn->links_with_work, links_with_work); sys_mutex_unlock(conn->work_lock); event_count += DEQ_SIZE(work_list); @@ -244,10 +246,10 @@ int qdr_connection_process(qdr_connection_t *conn) free_link = false; sys_mutex_lock(conn->work_lock); - ref = DEQ_HEAD(conn->links_with_work); + ref = DEQ_HEAD(links_with_work); if (ref) { link = ref->link; - qdr_del_link_ref(&conn->links_with_work, ref->link, QDR_LINK_LIST_CLASS_WORK); + qdr_del_link_ref(&links_with_work, ref->link, QDR_LINK_LIST_CLASS_WORK); link_work = DEQ_HEAD(link->work_list); if (link_work) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
