You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2018/04/30 19:57:39 UTC

qpid-dispatch git commit: DISPATCH-983: take snapshot of current links with work when copying connection work

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master e645721c7 -> 623f4e67a


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/623f4e67
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/623f4e67
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/623f4e67

Branch: refs/heads/master
Commit: 623f4e67a2a44281b7c75c44dafb3b4e7558bb80
Parents: e645721
Author: Gordon Sim <gs...@redhat.com>
Authored: Mon Apr 30 20:44:02 2018 +0100
Committer: Gordon Sim <gs...@redhat.com>
Committed: Mon Apr 30 20:57:03 2018 +0100

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


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/623f4e67/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: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org