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 2021/06/08 18:31:40 UTC

[qpid-dispatch] branch main updated: DISPATCH-2066: unblock Q2 on setting message receive complete

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

kgiusti 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 fff5513  DISPATCH-2066: unblock Q2 on setting message receive complete
fff5513 is described below

commit fff55137564fc11cc1ea6949ad27d678dc7d56d1
Author: Kenneth Giusti <kg...@apache.org>
AuthorDate: Tue Jun 8 11:45:53 2021 -0400

    DISPATCH-2066: unblock Q2 on setting message receive complete
    
    This closes #1247
---
 src/message.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/message.c b/src/message.c
index 37d8370..edf1355 100644
--- a/src/message.c
+++ b/src/message.c
@@ -1327,14 +1327,22 @@ void qd_message_set_receive_complete(qd_message_t *in_msg)
 {
     if (!!in_msg) {
         qd_message_content_t *content = MSG_CONTENT(in_msg);
+        qd_message_q2_unblocker_t  q2_unblock = {0};
 
         LOCK(content->lock);
 
         content->receive_complete = true;
+        if (content->q2_input_holdoff) {
+            content->q2_input_holdoff = false;
+            q2_unblock = content->q2_unblocker;
+        }
         content->q2_unblocker.handler = 0;
         qd_nullify_safe_ptr(&content->q2_unblocker.context);
 
         UNLOCK(content->lock);
+
+        if (q2_unblock.handler)
+            q2_unblock.handler(q2_unblock.context);
     }
 }
 

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