[
https://issues.apache.org/jira/browse/DISPATCH-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16054472#comment-16054472
]
ASF GitHub Bot commented on DISPATCH-788:
-----------------------------------------
Github user ted-ross commented on a diff in the pull request:
https://github.com/apache/qpid-dispatch/pull/167#discussion_r122776057
--- Diff: src/router_core/transfer.c ---
@@ -413,6 +413,43 @@ static void qdr_delete_delivery_internal_CT(qdr_core_t
*core, qdr_delivery_t *de
}
+void qdr_delivery_link_peers_CT(qdr_delivery_t *in_dlv, qdr_delivery_t
*out_dlv)
+{
+ if (in_dlv->peer || out_dlv->peer)
+ // One of the deliveries already has a peer. Don't proceed.
+ return;
+
+ out_dlv->peer = in_dlv;
+ in_dlv->peer = out_dlv;
+
+ qdr_delivery_incref(out_dlv);
+ qdr_delivery_incref(in_dlv);
+}
+
+
+void qdr_delivery_unlink_peers_CT(qdr_core_t *core, qdr_delivery_t *dlv,
qdr_delivery_t *peer)
+{
+ dlv->peer = 0;
+ peer->peer = 0;
+
+ qdr_delivery_decref_CT(core, dlv);
--- End diff --
What if these two deliveries weren't linked to one another? You will cause
a data corruption with no indication. You should assert that the proper mutual
linkage is in place before removing it and decrementing reference counts.
> Create peer linkage for presettled deliveries so we can use this to handle
> muticast dispositions
> ------------------------------------------------------------------------------------------------
>
> Key: DISPATCH-788
> URL: https://issues.apache.org/jira/browse/DISPATCH-788
> Project: Qpid Dispatch
> Issue Type: Improvement
> Components: Container
> Affects Versions: 0.8.0
> Reporter: Ganesh Murthy
> Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> Right now peer delivieries are not created for presettled messages. Create
> peers for presettled messages so that this feature can be used to implement
> several features like message streaming, handling multicast dispositions etc.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]