Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 85770 invoked from network); 8 Apr 2009 17:55:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Apr 2009 17:55:00 -0000 Received: (qmail 57097 invoked by uid 500); 8 Apr 2009 17:55:00 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 57053 invoked by uid 500); 8 Apr 2009 17:55:00 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 57044 invoked by uid 99); 8 Apr 2009 17:55:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2009 17:55:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2009 17:54:58 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 90D812388999; Wed, 8 Apr 2009 17:54:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r763333 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/MessageDispatchChannel.cpp Date: Wed, 08 Apr 2009 17:54:37 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090408175437.90D812388999@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 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(); } //////////////////////////////////////////////////////////////////////////////// @@ -91,6 +96,8 @@ } return channel.pop(); } + + return Pointer(); } //////////////////////////////////////////////////////////////////////////////// @@ -101,6 +108,8 @@ } return channel.front(); } + + return Pointer(); } //////////////////////////////////////////////////////////////////////////////// @@ -142,15 +151,20 @@ //////////////////////////////////////////////////////////////////////////////// int MessageDispatchChannel::size() const { synchronized( &channel ) { - return channel.size(); + return (int)channel.size(); } + + return 0; } //////////////////////////////////////////////////////////////////////////////// std::vector< Pointer > MessageDispatchChannel::removeAll() { - synchronized( &channel ) { - std::vector< Pointer > result = channel.toArray(); + std::vector< Pointer > result; + + synchronized( &channel ) { + result = channel.toArray(); channel.clear(); - return result; } + + return result; }