qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1511762 - /qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Topic.cpp
Date Thu, 08 Aug 2013 12:58:23 GMT
Author: gsim
Date: Thu Aug  8 12:58:23 2013
New Revision: 1511762

URL: http://svn.apache.org/r1511762
Log:
QPID-5054: check whether topic actually exists in delete request

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Topic.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Topic.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Topic.cpp?rev=1511762&r1=1511761&r2=1511762&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Topic.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Topic.cpp Thu Aug  8 12:58:23 2013
@@ -117,8 +117,12 @@ bool TopicRegistry::deleteObject(Broker&
 {
     if (type == TOPIC) {
         boost::shared_ptr<Topic> topic = remove(name);
-        if (topic->isDurable()) broker.getStore().destroy(*topic);
-        return true;
+        if (topic) {
+            if (topic->isDurable()) broker.getStore().destroy(*topic);
+            return true;
+        } else {
+            return false;
+        }
     } else {
         return false;
     }



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


Mime
View raw message