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

gsim 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 15db9bf  DISPATCH-1421: copy terminus for which peer is authoritative 
when refusing link
15db9bf is described below

commit 15db9bf50e12f003eff97ab0c4ca6ca952510fb8
Author: Gordon Sim <g...@redhat.com>
AuthorDate: Thu Oct 3 20:29:23 2019 +0100

    DISPATCH-1421: copy terminus for which peer is authoritative when refusing 
link
---
 src/router_node.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/router_node.c b/src/router_node.c
index c302e20..d634287 100644
--- a/src/router_node.c
+++ b/src/router_node.c
@@ -1449,10 +1449,13 @@ static void CORE_link_detach(void *context, qdr_link_t 
*link, qdr_error_t *error
     // if we don't nullify it here.
     //
     if (pn_link_state(pn_link) & PN_LOCAL_UNINIT) {
-        if (pn_link_is_receiver(pn_link))
+        if (pn_link_is_receiver(pn_link)) {
             pn_terminus_set_type(pn_link_target(pn_link), PN_UNSPECIFIED);
-        else
+            pn_terminus_copy(pn_link_source(pn_link), 
pn_link_remote_source(pn_link));
+        } else {
             pn_terminus_set_type(pn_link_source(pn_link), PN_UNSPECIFIED);
+            pn_terminus_copy(pn_link_target(pn_link), 
pn_link_remote_target(pn_link));
+        }
     }
 
     if (close)


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

Reply via email to