activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r544817 - in /activemq/activemq-cpp/trunk/src/decaf: KEYS configure.ac src/main/decaf/net/SocketInputStream.cpp src/main/decaf/net/SocketInputStream.h src/main/decaf/net/SocketOutputStream.cpp src/main/decaf/net/SocketOutputStream.h
Date Wed, 06 Jun 2007 11:57:34 GMT
Author: tabish
Date: Wed Jun  6 04:57:33 2007
New Revision: 544817

URL: http://svn.apache.org/viewvc?view=rev&rev=544817
Log:
http://issues.apache.org/activemq/browse/AMQCPP-103

Building Decaf lib

Added:
    activemq/activemq-cpp/trunk/src/decaf/KEYS
Modified:
    activemq/activemq-cpp/trunk/src/decaf/configure.ac
    activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketInputStream.cpp
    activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketInputStream.h
    activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketOutputStream.cpp
    activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketOutputStream.h

Added: activemq/activemq-cpp/trunk/src/decaf/KEYS
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/KEYS?view=auto&rev=544817
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/KEYS (added)
+++ activemq/activemq-cpp/trunk/src/decaf/KEYS Wed Jun  6 04:57:33 2007
@@ -0,0 +1,102 @@
+pub   1024D/CCD6F801 2006-11-15
+uid                  Nathan Mittler <nathan.mittler@gmail.com>
+sig 3        CCD6F801 2006-11-15  Nathan Mittler <nathan.mittler@gmail.com>
+sub   2048g/F5B8EA6A 2006-11-15
+sig          CCD6F801 2006-11-15  Nathan Mittler <nathan.mittler@gmail.com>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.2.2 (FreeBSD)
+
+mQGiBEVbpV0RBADJcRJLaDaspQfYql0ok3H/8FKeosZ5zuy37QLICwB9wpq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
+LHEDbMo4McR/Y/da7wADBQf9GAm5486yFNc1VeMtUs7JUgJVdMdK1hxtgyMpy6i3
+xKdgReV7Nw6Vk1vKhKD53rLXfy5fk8PycSLKC63A/vhO1mHydW6pXtumILOtYdZw
+9FUNRfZIUTPyqnbPx+PZi3jmkK63qIfu8DFzfjxV9RxjhmRVgrzuBvEKqo5dAHM0
+9JOMwumE8nmYM0jrUt40IAozkLorWxnZZVZx1zsZGsLj4+0V7IurWMEYmWnmd/iF
+nDZi6CggW9om4NJJ72rNAYiEgZjLL9xBBjYplhqMQBHR+pZ8Jl56i78ZA8DfPejx
+LM/E931dZyTMAakFsTnFmRf4+DN+PKF4zd3lQuFhxk17QYhJBBgRAgAJBQJFW6Vi
+AhsMAAoJEMGEfSvM1vgBuWgAnjqmxSJjNF84pGejBbEAgPHYOlWyAJ4vpBTlolF0
+1tcyAF4QTEDQbKvJwg==
+=ssQm
+-----END PGP PUBLIC KEY BLOCK-----
+pub   1024D/5E4119DD 2007-04-06
+uid                  Timothy Bish <tabish121@gmail.com>
+sig 3        5E4119DD 2007-04-06  Timothy Bish <tabish121@gmail.com>
+sub   2048g/5D0D0993 2007-04-06
+sig          5E4119DD 2007-04-06  Timothy Bish <tabish121@gmail.com>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.7 (GNU/Linux)
+
+mQGiBEYWrAMRBADIah561RTKg4Fcp9DRzLLz2lPZekB1QefjaJMpuA5hrs5otN+I
+N3DOa4eM1q2Tq4GDoo14qMWv1Xxrp3MQskYIXzFwiju6JUQ92I76BG0qutr4eJPv
+ySIIOUElo96Y+7ye9iWRmBKDjM3mFNpCZsJ+eXJyuYeJ3bPDGR3EE+jkUwCgwjCC
+IUTdsAv2osu0ddJdTgTeicMEAJphtRFabJy5+5B/idMCWQW4RldF4Dus7N+wnWR3
+zkAw77DxQfno4Y29HKFo6omvMM5rM35ZXX58oGwYAhkTUUp47zglmKBCvptKDxOK
+zr+F1lDpulEfP/bOtX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Y1rVXhdGM8LLnfKJazhH6AbQwrptJCsnf
+gYpsSlm9oNW4fAvB852SN+zJrly0Jl/+tsdciEkEGBECAAkFAkYWrAMCGwwACgkQ
+2iSmy15BGd0F6QCeLKexEs2tW7uJK5FkSD4c+JGzhdEAoIUj6K6rjNNbbd4gq4L7
+dnc+3S9/
+=ASER
+-----END PGP PUBLIC KEY BLOCK-----
+pub   1024D/70AE7D08 2007-04-04
+uid                  Nathan Mittler <nathan.mittler@gmail.com>
+sig 3        70AE7D08 2007-04-04  Nathan Mittler <nathan.mittler@gmail.com>
+sub   1024g/A1255264 2007-04-04
+sig          70AE7D08 2007-04-04  Nathan Mittler <nathan.mittler@gmail.com>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.7 (Darwin)
+
+mQGiBEYTksURBADfn9FYnPKtlRhC0o6ScnPJLePomEpd22F2b8uuC+q+0A6YwvLz
+aDz9k0pEnvFFHdWjTZPUzDXEb4CjRjnoGz5hnZUNG8bJxgkwKt1nUawjYnOgy17b
+ekYmhLtyS2T6jtHx2qIHw/B9Xu0TfHZTBht1H8kFPliteJf46PTxXX3k6wCg9Dls
+YoKoV4cPodpJUiN8AmaKdh8EAKqfQEn4mkwUkBw4Th4KxIl3/YfnNeH4kL1ejp/m
+Pwdf3u7EhEcyCc2i9iNDgvjaUO0SZVD0cJShWq3Us8PT6vAB+WYvk4LWywc6tSTe
+G80Ma0KWX6CXuvFKjlS0K17PqS2G4kb8kUjgSJto/NqC6TBY7/R+X1rrXcx6NtWA
+a/cNBADAGSMJTJGUpPFXBrcncBAlfBLtXVfGGknplyjlfewi7FXopy3K3+otYune
+VHk6V/A/xULLRuGgx+GwytJRTGcNc84tuIDm2iiI4JT4E+a6Ghi5A+xucUpLLi2f
+6OMYDz2QH6IAbLXjSLUcSwW/YNg+1wFotQCKkQR5dmZgghM2PLQpTmF0aGFuIE1p
+dHRsZXIgPG5hdGhhbi5taXR0bGVyQGdtYWlsLmNvbT6IYAQTEQIAIAUCRhOSxQIb
+IwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEII00zVwrn0IlEgAoN+ULhiUYtPx
+MhMGj+i9NOtJqOKoAKDmic8ZTi3HDUpyEsOvV/FeUaBrIbkBDQRGE5LFEAQAt2cH
+aKxpQyewpsCupoC24FIdtPOxtK0fr1pM4n7zyCcjiEFVM5RzylyZg00IRcDxHE6N
+E6n6ydshZ3oM+UabvgltLpeEdJI02p0YccE7FA6iQ80ChMm4bjLUwsBW1Lw2zKza
+oDk0A8PNlmgjwHJi9yrw2nje8QH+aTvvtMj+WucAAwcD/05X6+YplQb4NPjUP7uG
+LzXuGOOS7msDBtqi3zOMzFbfY7H7OtF/SZmDzWDsZiQwq/nlTfernHCKe+/kUHTt
+9pJ7+5cGKFy5chgzVmCbYW6s8+IiaZVFLc5iWASqGhd/a9tEItughEK3pOt3kjud
+o0WcDTFOe9+YGbFAZg8kuMsbiEkEGBECAAkFAkYTksUCGwwACgkQgjTTNXCufQjL
+qQCeKZi8Gs8h9qS511FdlWnV0J6C2U4An0p+wQBKYckIUy5Fif3uWaHsSpa1
+=uYcU
+-----END PGP PUBLIC KEY BLOCK-----

Modified: activemq/activemq-cpp/trunk/src/decaf/configure.ac
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/configure.ac?view=diff&rev=544817&r1=544816&r2=544817
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/configure.ac (original)
+++ activemq/activemq-cpp/trunk/src/decaf/configure.ac Wed Jun  6 04:57:33 2007
@@ -86,8 +86,7 @@
 AM_PATH_CPPUNIT(1.10.2, cppunit=yes, cppunit=no; AC_MSG_RESULT([no. Unit and Integration
tests disabled]))
 AM_CONDITIONAL(BUILD_CPPUNIT_TESTS, test x$cppunit = xyes)
 
-CXXFLAGS="$CXXFLAGS -W -Wall -fstrict-aliasing -Wstrict-aliasing=2 -Wno-long-long"
-# CPPUNIT_CXXFLAGS="$CPPUNIT_CXXFLAGS -Wno-non-virtual-dtor -Wno-unused-parameter -Wno-uninitialized"
+CXXFLAGS="$CXXFLAGS -W -Wall -fPIC -fstrict-aliasing -Wstrict-aliasing=2 -Wno-long-long"
 LIBS="$LIBS"
 
 case "${host_os}" in

Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketInputStream.cpp?view=diff&rev=544817&r1=544816&r2=544817
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketInputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketInputStream.cpp Wed Jun
 6 04:57:33 2007
@@ -55,11 +55,15 @@
 SocketInputStream::SocketInputStream( net::Socket::SocketHandle socket )
 {
     this->socket = socket;
+    this->closed = false;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-SocketInputStream::~SocketInputStream()
-{
+SocketInputStream::~SocketInputStream(){}
+
+////////////////////////////////////////////////////////////////////////////////
+void SocketInputStream::close() throw( cms::CMSException ){
+    this->closed = true;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -121,7 +125,7 @@
 
     unsigned char c;
     std::size_t len = read( &c, 1 );
-    if( len != sizeof(c) ){
+    if( len != sizeof(c)  && !closed ){
         throw IOException( __FILE__, __LINE__,
             "activemq::io::SocketInputStream::read - failed reading a byte");
     }
@@ -142,16 +146,16 @@
         len = ::recv(socket, (char*)buffer, (int)bufferSize, 0);
 
         // Check for a closed socket.
-        if( len == 0 ){
+        if( len == 0 && !closed ){
             throw IOException( __FILE__, __LINE__,
                 "activemq::io::SocketInputStream::read - The connection is broken" );
         }
 
-    } while( len == -1 &&
+    } while( !closed && len == -1 &&
              SocketError::getErrorCode() == SocketError::INTERRUPTED );
 
     // Check for error.
-    if( len == -1 ){
+    if( len == -1 && !closed ){
 
         // Otherwise, this was a bad error - throw an exception.
         throw IOException( __FILE__, __LINE__,

Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketInputStream.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketInputStream.h?view=diff&rev=544817&r1=544816&r2=544817
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketInputStream.h (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketInputStream.h Wed Jun 
6 04:57:33 2007
@@ -37,6 +37,7 @@
         // The socket handle.
         Socket::SocketHandle socket;
         util::concurrent::Mutex mutex;
+        bool closed;
 
     public:
 
@@ -144,7 +145,7 @@
          * of the socket object to close it.
          * @throws CMSException
          */
-        virtual void close() throw( lang::Exception ){}
+        virtual void close() throw( lang::Exception );
 
         /**
          * Not supported.

Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketOutputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketOutputStream.cpp?view=diff&rev=544817&r1=544816&r2=544817
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketOutputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketOutputStream.cpp Wed Jun
 6 04:57:33 2007
@@ -49,11 +49,17 @@
 SocketOutputStream::SocketOutputStream( Socket::SocketHandle socket )
 {
     this->socket = socket;
+    this->closed = false;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-SocketOutputStream::~SocketOutputStream()
-{
+SocketOutputStream::~SocketOutputStream() {
+    close();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void SocketOutputStream::close() throw( cms::CMSException ) {
+	this->closed = true;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -69,10 +75,10 @@
     std::size_t remaining = len;
     int sendOpts = AMQ_SEND_OPTS;
 
-    while( remaining > 0 )
+    while( remaining > 0 && !closed )
     {
         int length = ::send( socket, (const char*)buffer, (int)remaining, sendOpts );
-        if( length == -1 ){
+        if( length == -1 && !closed ){
             throw IOException( __FILE__, __LINE__,
                 "activemq::io::SocketOutputStream::write - %s", SocketError::getErrorString().c_str()
);
         }

Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketOutputStream.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketOutputStream.h?view=diff&rev=544817&r1=544816&r2=544817
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketOutputStream.h (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/net/SocketOutputStream.h Wed Jun
 6 04:57:33 2007
@@ -36,6 +36,7 @@
         // The socket.
         Socket::SocketHandle socket;
         util::concurrent::Mutex mutex;
+        bool closed;
 
     public:
 
@@ -133,7 +134,7 @@
          * of the socket object to close it.
          * @throws CMSException
          */
-        virtual void close() throw( lang::Exception ){}
+        virtual void close() throw( lang::Exception );
 
     };
 



Mime
View raw message