Return-Path: X-Original-To: apmail-qpid-commits-archive@www.apache.org Delivered-To: apmail-qpid-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A09F917B0E for ; Fri, 24 Apr 2015 15:20:32 +0000 (UTC) Received: (qmail 62590 invoked by uid 500); 24 Apr 2015 15:20:32 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 62515 invoked by uid 500); 24 Apr 2015 15:20:32 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 61717 invoked by uid 99); 24 Apr 2015 15:20:32 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Apr 2015 15:20:32 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EA695E18FA; Fri, 24 Apr 2015 15:20:31 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: robbie@apache.org To: commits@qpid.apache.org Date: Fri, 24 Apr 2015 15:20:49 -0000 Message-Id: In-Reply-To: <2791dce23c9447fe8fe6b03fc59afe50@git.apache.org> References: <2791dce23c9447fe8fe6b03fc59afe50@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [19/25] qpid-proton git commit: PROTON-850: ensure attach updates correct link object PROTON-850: ensure attach updates correct link object (cherry picked from commit fd26ec66bcd1fda328ceca119efc43bf787e0bcf) Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/1324d972 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/1324d972 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/1324d972 Branch: refs/heads/0.9.x Commit: 1324d972f28c721a73e217ab9630d2c208e74b07 Parents: 69fc2eb Author: Gordon Sim Authored: Fri Apr 17 11:41:10 2015 +0100 Committer: Robert Gemmell Committed: Fri Apr 24 15:48:41 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/1324d972/proton-c/src/transport/transport.c ---------------------------------------------------------------------- diff --git a/proton-c/src/transport/transport.c b/proton-c/src/transport/transport.c index 8b36389..10ac8fb 100644 --- a/proton-c/src/transport/transport.c +++ b/proton-c/src/transport/transport.c @@ -1078,6 +1078,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-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org