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 9650417D2C for ; Wed, 15 Apr 2015 20:19:02 +0000 (UTC) Received: (qmail 4917 invoked by uid 500); 15 Apr 2015 20:18:56 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 4889 invoked by uid 500); 15 Apr 2015 20:18:56 -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 4880 invoked by uid 99); 15 Apr 2015 20:18:56 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Apr 2015 20:18:56 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 1E6C5AC0095 for ; Wed, 15 Apr 2015 20:18:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1673949 - /qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Session.cpp Date: Wed, 15 Apr 2015 20:18:56 -0000 To: commits@qpid.apache.org From: gsim@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150415201856.1E6C5AC0095@hades.apache.org> Author: gsim Date: Wed Apr 15 20:18:55 2015 New Revision: 1673949 URL: http://svn.apache.org/r1673949 Log: QPID-6492: make sure local terminus is null in the attache we send back if it will be immediately followed by a detach due to error Modified: qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Session.cpp Modified: qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Session.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Session.cpp?rev=1673949&r1=1673948&r2=1673949&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Session.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Session.cpp Wed Apr 15 20:18:55 2015 @@ -400,7 +400,12 @@ void Session::attach(pn_link_t* link) pn_terminus_set_address(pn_link_source(link), name.c_str()); } - setupOutgoing(link, source, name); + try { + setupOutgoing(link, source, name); + } catch (const std::exception&) { + pn_terminus_set_type(pn_link_source(link), PN_UNSPECIFIED); + throw; + } } else { pn_terminus_t* target = pn_link_remote_target(link); std::string name; @@ -422,7 +427,12 @@ void Session::attach(pn_link_t* link) pn_terminus_set_address(pn_link_target(link), name.c_str()); } - setupIncoming(link, target, name); + try { + setupIncoming(link, target, name); + } catch (const std::exception&) { + pn_terminus_set_type(pn_link_target(link), PN_UNSPECIFIED); + throw; + } } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org