Repository: qpid-proton
Updated Branches:
  refs/heads/master a977f933d -> fd26ec66b


PROTON-850: ensure attach updates correct link object


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

Branch: refs/heads/master
Commit: fd26ec66bcd1fda328ceca119efc43bf787e0bcf
Parents: a977f93
Author: Gordon Sim <g...@redhat.com>
Authored: Fri Apr 17 11:41:10 2015 +0100
Committer: Gordon Sim <g...@redhat.com>
Committed: Wed Apr 22 17:25:09 2015 +0100

----------------------------------------------------------------------
 proton-c/src/transport/transport.c | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/fd26ec66/proton-c/src/transport/transport.c
----------------------------------------------------------------------
diff --git a/proton-c/src/transport/transport.c 
b/proton-c/src/transport/transport.c
index 20e1634..6868135 100644
--- a/proton-c/src/transport/transport.c
+++ b/proton-c/src/transport/transport.c
@@ -1139,6 +1139,11 @@ pn_link_t *pn_find_link(pn_session_t *ssn, pn_bytes_t 
name, bool is_sender)
   {
     pn_link_t *link = (pn_link_t *) pn_list_get(ssn->links, i);
     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)) &&
         !strncmp(name.start, pn_string_get(link->name), name.size))
     {
       return link;


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

Reply via email to