activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r761421 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core: ActiveMQConsumer.cpp ActiveMQConsumer.h
Date Thu, 02 Apr 2009 20:40:25 GMT
Author: tabish
Date: Thu Apr  2 20:40:25 2009
New Revision: 761421

URL: http://svn.apache.org/viewvc?rev=761421&view=rev
Log:
Fix some issues on Windows with the latest changes in trunk.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp?rev=761421&r1=761420&r2=761421&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp Thu
Apr  2 20:40:25 2009
@@ -628,7 +628,7 @@
             ack->setAckType( type );
             ack->setConsumerId( this->consumerInfo->getConsumerId() );
             ack->setDestination( message->getDestination() );
-            ack->setMessageCount( dispatchedMessages.size() );
+            ack->setMessageCount( (int)dispatchedMessages.size() );
             ack->setLastMessageId( message->getMessageId() );
             ack->setFirstMessageId( dispatchedMessages.back()->getMessageId() );
 
@@ -680,9 +680,9 @@
             pendingAck.reset( NULL );
 
             // Adjust the counters
-            deliveredCounter -= dispatchedMessages.size();
+            deliveredCounter -= (int)dispatchedMessages.size();
             additionalWindowSize =
-                Math::max( 0, additionalWindowSize - dispatchedMessages.size() );
+                Math::max( 0, additionalWindowSize - (int)dispatchedMessages.size() );
 
             if( !session->isTransacted() ) {
                 dispatchedMessages.clear();
@@ -737,14 +737,14 @@
                 ack->setAckType( ActiveMQConstants::ACK_TYPE_POISON );
                 ack->setConsumerId( this->consumerInfo->getConsumerId() );
                 ack->setDestination( lastMsg->getDestination() );
-                ack->setMessageCount( dispatchedMessages.size() );
+                ack->setMessageCount( (int)dispatchedMessages.size() );
                 ack->setLastMessageId( lastMsg->getMessageId() );
                 ack->setFirstMessageId( firstMsgId );
 
                 session->oneway( ack );
                 // Adjust the window size.
                 additionalWindowSize =
-                    Math::max( 0, additionalWindowSize - dispatchedMessages.size() );
+                    Math::max( 0, additionalWindowSize - (int)dispatchedMessages.size() );
                 redeliveryDelay = 0;
 
             } else {
@@ -755,7 +755,7 @@
                     ack->setAckType( ActiveMQConstants::ACK_TYPE_REDELIVERED );
                     ack->setConsumerId( this->consumerInfo->getConsumerId() );
                     ack->setDestination( lastMsg->getDestination() );
-                    ack->setMessageCount( dispatchedMessages.size() );
+                    ack->setMessageCount( (int)dispatchedMessages.size() );
                     ack->setLastMessageId( lastMsg->getMessageId() );
                     ack->setFirstMessageId( firstMsgId );
 
@@ -770,7 +770,7 @@
                 }
 
             }
-            deliveredCounter -= dispatchedMessages.size();
+            deliveredCounter -= (int)dispatchedMessages.size();
             dispatchedMessages.clear();
         }
     }
@@ -795,14 +795,16 @@
             return;
         }
 
+	    cms::MessageListener* cmsListener = this->listener.get();
+
         // If we have a listener, send the message.
-        if( this->listener.get() != NULL ) {
+        if( cmsListener != NULL ) {
 
             // Preprocessing.
             beforeMessageIsConsumed( message );
 
             // Notify the listener
-            this->listener.get()->onMessage( dynamic_cast<cms::Message*>( message.get()
) );
+            cmsListener->onMessage( dynamic_cast<cms::Message*>( message.get() )
);
 
             // Postprocessing
             afterMessageIsConsumed( message, false );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h?rev=761421&r1=761420&r2=761421&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h Thu
Apr  2 20:40:25 2009
@@ -111,7 +111,7 @@
         /**
          * Time to wait before restarting delivery of rollback messages.
          */
-        long redeliveryDelay;
+        long long redeliveryDelay;
 
         /**
          * Has the Synchronization been added for this transaction



Mime
View raw message