You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2018/07/03 22:14:09 UTC

[80/89] [abbrv] qpid-proton git commit: PROTON-1845: treat attach after detach as starting new link

PROTON-1845: treat attach after detach as starting new link


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

Branch: refs/heads/go1
Commit: cd4ecfd8a24bf979a63cd734b695c48c2b7cf7f9
Parents: 1315f26
Author: Gordon Sim <gs...@redhat.com>
Authored: Tue May 15 19:59:58 2018 +0100
Committer: Gordon Sim <gs...@redhat.com>
Committed: Wed May 16 16:54:56 2018 +0100

----------------------------------------------------------------------
 c/src/core/transport.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/cd4ecfd8/c/src/core/transport.c
----------------------------------------------------------------------
diff --git a/c/src/core/transport.c b/c/src/core/transport.c
index 4f0e98f..bfa66c1 100644
--- a/c/src/core/transport.c
+++ b/c/src/core/transport.c
@@ -1263,9 +1263,9 @@ static pn_link_t *pni_find_link(pn_session_t *ssn, pn_bytes_t name, bool is_send
     if (link->endpoint.type == type &&
         // This function is used to locate the link object for an
         // incoming attach. If a link object of the same name is found
-        // which is closed both locally and remotely, assume that is
-        // no longer in use.
-        !((link->endpoint.state & PN_LOCAL_CLOSED) && (link->endpoint.state & PN_REMOTE_CLOSED)) &&
+        // which is remotely closed or detached, assume that is
+        // no longer in use and a new link is intended.
+        (!(link->endpoint.state & PN_REMOTE_CLOSED) && ((int32_t) link->state.remote_handle != -2)) &&
         pn_bytes_equal(name, pn_string_bytes(link->name)))
     {
       return link;


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