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-908 - Modified qdr_connection_process to handle dispositions before detaches
Date Fri, 16 Feb 2018 19:45:08 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/1.0.x ce5270335 -> ac22c1532


DISPATCH-908 - Modified qdr_connection_process to handle dispositions before detaches

(cherry picked from commit 785c99d1cd9279505eb64ffdec87acc13eacada0)


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

Branch: refs/heads/1.0.x
Commit: ac22c1532786966fc3c7f75e8aa3fadf6c056830
Parents: ce52703
Author: Ganesh Murthy <gmurthy@redhat.com>
Authored: Mon Jan 22 13:43:39 2018 -0500
Committer: Ganesh Murthy <gmurthy@redhat.com>
Committed: Fri Feb 16 14:27:33 2018 -0500

----------------------------------------------------------------------
 src/router_core/connections.c | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/ac22c153/src/router_core/connections.c
----------------------------------------------------------------------
diff --git a/src/router_core/connections.c b/src/router_core/connections.c
index 2c7200b..dd7a2a4 100644
--- a/src/router_core/connections.c
+++ b/src/router_core/connections.c
@@ -254,6 +254,24 @@ int qdr_connection_process(qdr_connection_t *conn)
         sys_mutex_unlock(conn->work_lock);
 
         if (link) {
+
+            //
+            // Handle disposition/settlement updates
+            //
+            qdr_delivery_ref_list_t updated_deliveries;
+            sys_mutex_lock(conn->work_lock);
+            DEQ_MOVE(link->updated_deliveries, updated_deliveries);
+            sys_mutex_unlock(conn->work_lock);
+
+            qdr_delivery_ref_t *dref = DEQ_HEAD(updated_deliveries);
+            while (dref) {
+                core->delivery_update_handler(core->user_context, dref->dlv, dref->dlv->disposition,
dref->dlv->settled);
+                qdr_delivery_decref(core, dref->dlv, "qdr_connection_process - remove
from updated list");
+                qdr_del_delivery_ref(&updated_deliveries, dref);
+                dref = DEQ_HEAD(updated_deliveries);
+                event_count++;
+            }
+
             while (link_work) {
                 switch (link_work->work_type) {
                 case QDR_LINK_WORK_DELIVERY :
@@ -303,23 +321,6 @@ int qdr_connection_process(qdr_connection_t *conn)
                 event_count++;
             }
 
-            //
-            // Handle disposition/settlement updates
-            //
-            qdr_delivery_ref_list_t updated_deliveries;
-            sys_mutex_lock(conn->work_lock);
-            DEQ_MOVE(link->updated_deliveries, updated_deliveries);
-            sys_mutex_unlock(conn->work_lock);
-
-            qdr_delivery_ref_t *dref = DEQ_HEAD(updated_deliveries);
-            while (dref) {
-                core->delivery_update_handler(core->user_context, dref->dlv, dref->dlv->disposition,
dref->dlv->settled);
-                qdr_delivery_decref(core, dref->dlv, "qdr_connection_process - remove
from updated list");
-                qdr_del_delivery_ref(&updated_deliveries, dref);
-                dref = DEQ_HEAD(updated_deliveries);
-                event_count++;
-            }
-
             if (free_link)
                 qdr_link_delete(link);
         }


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


Mime
View raw message