You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2019/07/05 19:14:36 UTC

[qpid-dispatch] branch master updated: DISPATCH-1378: lock the links_with_work list when processing flow

This is an automated email from the ASF dual-hosted git repository.

kgiusti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
     new 9ec1964  DISPATCH-1378: lock the links_with_work list when processing flow
9ec1964 is described below

commit 9ec19640722ac3a1a31b5755d1e0e68441f154ab
Author: Kenneth Giusti <kg...@apache.org>
AuthorDate: Fri Jun 28 17:01:27 2019 -0400

    DISPATCH-1378: lock the links_with_work list when processing flow
    
    This closes #529
---
 src/router_core/transfer.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/router_core/transfer.c b/src/router_core/transfer.c
index 9d8b544..0b642d3 100644
--- a/src/router_core/transfer.c
+++ b/src/router_core/transfer.c
@@ -309,11 +309,16 @@ static void qdr_link_flow_CT(qdr_core_t *core, qdr_action_t *action, bool discar
     //
     if (link->stalled_outbound) {
         link->stalled_outbound = false;
+
+        sys_mutex_lock(link->conn->work_lock);
+
         if (DEQ_SIZE(link->undelivered) > 0) {
             // Adding this work at priority 0.
             qdr_add_link_ref(link->conn->links_with_work, link, QDR_LINK_LIST_CLASS_WORK);
             activate = true;
         }
+
+        sys_mutex_unlock(link->conn->work_lock);
     }
 
     if (link->core_endpoint) {


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