qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1673949 - /qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Session.cpp
Date Wed, 15 Apr 2015 20:18:56 GMT
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


Mime
View raw message