qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1518180 - in /qpid/trunk/qpid/cpp/src: ./ qpid/broker/amqp/ qpid/messaging/amqp/
Date Wed, 28 Aug 2013 12:41:15 GMT
Author: gsim
Date: Wed Aug 28 12:41:14 2013
New Revision: 1518180

URL: http://svn.apache.org/r1518180
Log:
QPID-4670: Move to proton 0.5, remove dummy string in address for dynamic nodes

Modified:
    qpid/trunk/qpid/cpp/src/amqp.cmake
    qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Connection.cpp
    qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp
    qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Relay.cpp
    qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Relay.h
    qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp
    qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp

Modified: qpid/trunk/qpid/cpp/src/amqp.cmake
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/amqp.cmake?rev=1518180&r1=1518179&r2=1518180&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/amqp.cmake (original)
+++ qpid/trunk/qpid/cpp/src/amqp.cmake Wed Aug 28 12:41:14 2013
@@ -24,8 +24,8 @@ include(FindPkgConfig)
 pkg_check_modules(PROTON libqpid-proton)
 
 set (amqp_default ${amqp_force})
-set (minimum_version 0.3)
-set (maximum_version 0.4)
+set (minimum_version 0.5)
+set (maximum_version 0.5)
 if (PROTON_FOUND)
     if (PROTON_VERSION LESS ${minimum_version})
         message(STATUS "Qpid proton ${PROTON_VERSION} is too old, require ${minimum_version}
- ${maximum_version}; amqp 1.0 support not enabled")

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Connection.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Connection.cpp?rev=1518180&r1=1518179&r2=1518180&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Connection.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Connection.cpp Wed Aug 28 12:41:14 2013
@@ -182,12 +182,9 @@ void Connection::open()
 
 void Connection::readPeerProperties()
 {
-    /**
-     * TODO: enable when proton 0.5 has been released:
     qpid::types::Variant::Map properties;
     DataReader::read(pn_connection_remote_properties(connection), properties);
     setPeerProperties(properties);
-    */
 }
 
 void Connection::closed()

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp?rev=1518180&r1=1518179&r2=1518180&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Outgoing.cpp Wed Aug 28 12:41:14 2013
@@ -118,20 +118,19 @@ void OutgoingFromQueue::handle(pn_delive
         if (r.disposition) {
             switch (r.disposition) {
               case PN_ACCEPTED:
-                //TODO: only if consuming
-                queue->dequeue(0, r.cursor);
+                if (preAcquires()) queue->dequeue(0, r.cursor);
                 outgoingMessageAccepted();
                 break;
               case PN_REJECTED:
-                queue->reject(r.cursor);
+                if (preAcquires()) queue->reject(r.cursor);
                 outgoingMessageRejected();
                 break;
               case PN_RELEASED:
-                queue->release(r.cursor, false);//TODO: for PN_RELEASED, delivery count
should not be incremented
+                if (preAcquires()) queue->release(r.cursor, false);//TODO: for PN_RELEASED,
delivery count should not be incremented
                 outgoingMessageRejected();//TODO: not quite true...
                 break;
               case PN_MODIFIED:
-                queue->release(r.cursor, true);//TODO: proper handling of modified
+                if (preAcquires()) queue->release(r.cursor, true);//TODO: proper handling
of modified
                 outgoingMessageRejected();//TODO: not quite true...
                 break;
               default:

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Relay.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Relay.cpp?rev=1518180&r1=1518179&r2=1518180&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Relay.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Relay.cpp Wed Aug 28 12:41:14 2013
@@ -105,14 +105,14 @@ void Relay::detached(Outgoing*)
 {
     out = 0;
     isDetached = true;
-    std::cerr << "Outgoing link detached from relay" << std::endl;
+    QPID_LOG(info, "Outgoing link detached from relay [" << this << "]");
     if (in) in->wakeup();
 }
 void Relay::detached(Incoming*)
 {
     in = 0;
     isDetached = true;
-    std::cerr << "Incoming link detached from relay" << std::endl;
+    QPID_LOG(info, "Incoming link detached from relay [" << this << "]");
     if (out) out->wakeup();
 }
 
@@ -139,13 +139,13 @@ void OutgoingFromRelay::handle(pn_delive
     if (pn_delivery_writable(delivery)) {
         if (transfer->write(link)) {
             outgoingMessageSent();
-            QPID_LOG(debug, "Sent relayed message " << name);
+            QPID_LOG(debug, "Sent relayed message " << name << " [" <<
relay.get() << "]");
         } else {
-            QPID_LOG(error, "Failed to send relayed message " << name);
+            QPID_LOG(error, "Failed to send relayed message " << name << " ["
<< relay.get() << "]");
         }
     }
     if (pn_delivery_updated(delivery)) {
-        pn_disposition_t d = transfer->updated();
+        uint64_t d = transfer->updated();
         switch (d) {
           case PN_ACCEPTED:
             outgoingMessageAccepted();
@@ -226,6 +226,7 @@ void IncomingToRelay::detached()
     relay->detached(this);
 }
 
+BufferedTransfer::BufferedTransfer() : disposition(0) {}
 void BufferedTransfer::initIn(pn_link_t* link, pn_delivery_t* d)
 {
     in.handle = d;
@@ -264,7 +265,7 @@ void BufferedTransfer::initOut(pn_link_t
     pn_delivery_set_context(out.handle, this);
 }
 
-pn_disposition_t BufferedTransfer::updated()
+uint64_t BufferedTransfer::updated()
 {
     disposition = pn_delivery_remote_state(out.handle);
     if (disposition) {

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Relay.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Relay.h?rev=1518180&r1=1518179&r2=1518180&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Relay.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Relay.h Wed Aug 28 12:41:14 2013
@@ -45,10 +45,11 @@ struct Delivery
 class BufferedTransfer
 {
   public:
+    BufferedTransfer();
     void initIn(pn_link_t* link, pn_delivery_t* d);
     bool settle();
     void initOut(pn_link_t* link);
-    pn_disposition_t updated();
+    uint64_t updated();
     bool write(pn_link_t*);
   private:
     std::vector<char> data;
@@ -56,7 +57,7 @@ class BufferedTransfer
     Delivery out;
     pn_delivery_tag_t dt;
     std::vector<char> tag;
-    pn_disposition_t disposition;
+    uint64_t disposition;
 };
 
 /**

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp?rev=1518180&r1=1518179&r2=1518180&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/AddressHelper.cpp Wed Aug 28 12:41:14 2013
@@ -86,8 +86,6 @@ const std::string DELETE_IF_EMPTY("delet
 const std::string DELETE_IF_UNUSED_AND_EMPTY("delete-if-unused-and-empty");
 const std::string CREATE_ON_DEMAND("create-on-demand");
 
-const std::string DUMMY(".");
-
 const std::string X_DECLARE("x-declare");
 const std::string X_BINDINGS("x-bindings");
 const std::string X_SUBSCRIBE("x-subscribe");
@@ -544,7 +542,6 @@ void AddressHelper::configure(pn_terminu
     bool createOnDemand(false);
     if (isTemporary) {
         //application expects a name to be generated
-        pn_terminus_set_address(terminus, DUMMY.c_str());//workaround for PROTON-277
         pn_terminus_set_dynamic(terminus, true);
         setNodeProperties(terminus);
     } else {

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp?rev=1518180&r1=1518179&r2=1518180&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/ConnectionContext.cpp Wed Aug 28 12:41:14
2013
@@ -773,10 +773,6 @@ pn_bytes_t convert(const std::string& s)
 }
 void ConnectionContext::setProperties()
 {
-    /**
-     * Enable when proton 0.5 is released and qpidc has been updated
-     * to use it
-     *
     pn_data_t* data = pn_connection_properties(connection);
     pn_data_put_map(data);
     pn_data_enter(data);
@@ -791,7 +787,6 @@ void ConnectionContext::setProperties()
     pn_data_put_symbol(data, convert(CLIENT_PPID));
     pn_data_put_int(data, sys::SystemInfo::getParentProcessId());
     pn_data_exit(data);
-    **/
 }
 
 const qpid::sys::SecuritySettings* ConnectionContext::getTransportSecuritySettings()



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


Mime
View raw message