activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r763333 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/MessageDispatchChannel.cpp
Date Wed, 08 Apr 2009 17:54:37 GMT
Author: tabish
Date: Wed Apr  8 17:54:37 2009
New Revision: 763333

URL: http://svn.apache.org/viewvc?rev=763333&view=rev
Log:
Updates to this files to resolve windows build issues.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/MessageDispatchChannel.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/MessageDispatchChannel.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/MessageDispatchChannel.cpp?rev=763333&r1=763332&r2=763333&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/MessageDispatchChannel.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/MessageDispatchChannel.cpp
Wed Apr  8 17:54:37 2009
@@ -21,6 +21,7 @@
 using namespace activemq;
 using namespace activemq::core;
 using namespace activemq::commands;
+using namespace activemq::exceptions;
 using namespace decaf;
 using namespace decaf::lang;
 using namespace decaf::util;
@@ -58,11 +59,13 @@
     synchronized( &channel ) {
         return channel.empty();
     }
+
+	return false;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 Pointer<MessageDispatch> MessageDispatchChannel::dequeue( long long timeout )
-    throw( exceptions::ActiveMQException ) {
+    throw( ActiveMQException ) {
 
     synchronized( &channel ) {
         // Wait until the channel is ready to deliver messages.
@@ -70,7 +73,7 @@
             if( timeout == -1 ) {
                 channel.wait();
             } else {
-                channel.wait( timeout );
+                channel.wait( (unsigned long)timeout );
                 break;
             }
         }
@@ -81,6 +84,8 @@
 
         return channel.pop();
     }
+
+	return Pointer<MessageDispatch>();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -91,6 +96,8 @@
         }
         return channel.pop();
     }
+
+	return Pointer<MessageDispatch>();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -101,6 +108,8 @@
         }
         return channel.front();
     }
+
+	return Pointer<MessageDispatch>();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -142,15 +151,20 @@
 ////////////////////////////////////////////////////////////////////////////////
 int MessageDispatchChannel::size() const {
     synchronized( &channel ) {
-        return channel.size();
+        return (int)channel.size();
     }
+
+	return 0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 std::vector< Pointer<MessageDispatch> > MessageDispatchChannel::removeAll() {
-    synchronized( &channel ) {
-        std::vector< Pointer<MessageDispatch> > result = channel.toArray();
+    std::vector< Pointer<MessageDispatch> > result;
+	
+	synchronized( &channel ) {
+        result = channel.toArray();
         channel.clear();
-        return result;
     }
+
+    return result;
 }



Mime
View raw message