summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-04-29 00:09:34 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-04-29 00:09:34 +0000
commit6304f2ebf3f2d4c95f2848a24242520e83e69a59 (patch)
tree57ebbec9cb195969adb21a8d64fae5a103908dd2
parente6e16136e56c0277b7c25ad22ad2f4f1e155c4aa (diff)
downloadATCD-Bug_3647_Regression.tar.gz
Wed Apr 29 00:12:29 UTC 2009 Carlos O'Ryan <coryan@atdesk.com>Bug_3647_Regression
-rw-r--r--TAO/ChangeLog28
-rw-r--r--TAO/tao/Transport.cpp5
-rw-r--r--TAO/tao/Transport.h6
-rw-r--r--TAO/tests/Bug_3647_Regression/Backend_Impl.cpp6
-rw-r--r--TAO/tests/Bug_3647_Regression/Backend_Impl.h (renamed from TAO/tests/Bug_3647_Regression/Backend_Impl.hpp)19
-rw-r--r--TAO/tests/Bug_3647_Regression/Middle_Impl.cpp5
-rw-r--r--TAO/tests/Bug_3647_Regression/Middle_Impl.h (renamed from TAO/tests/Bug_3647_Regression/Middle_Impl.hpp)14
-rw-r--r--TAO/tests/Bug_3647_Regression/Throw_Spec.h12
-rw-r--r--TAO/tests/Bug_3647_Regression/backend_server.cpp2
-rw-r--r--TAO/tests/Bug_3647_Regression/middle_server.cpp2
10 files changed, 52 insertions, 47 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 568e377d302..d7100ca802f 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,31 @@
+Wed Apr 29 00:12:29 UTC 2009 Carlos O'Ryan <coryan@atdesk.com>
+
+ * tao/Transport.h:
+ * tao/Transport.cpp:
+ Restore the ACE_Countdown_Time object in drain_queue_helper().
+ I removed it because I thought there were no side effects and it
+ was not needed, but after Johnny W asked, I realised it was
+ indeed important.
+ The header changes are required because the Drain_Constraints
+ object needs a non-const ACE_Time_Value* parameter now.
+
+ * tests/Bug_3647_Regression/Backend_Impl.cpp:
+ * tests/Bug_3647_Regression/backend_server.cpp:
+ * tests/Bug_3647_Regression/Backend_Impl.hpp:
+ * tests/Bug_3647_Regression/Backend_Impl.h:
+ * tests/Bug_3647_Regression/Middle_Impl.cpp:
+ * tests/Bug_3647_Regression/Throw_Spec.h:
+ * tests/Bug_3647_Regression/Middle_Impl.hpp:
+ * tests/Bug_3647_Regression/middle_server.cpp:
+ * tests/Bug_3647_Regression/Middle_Impl.h:
+ I used a hacky macro to compile this code with both
+ TAO-1.5.1 (need throw specs) and TAO-1.6.9 (cannot have throw
+ specs)
+ I also changed the .hpp files to .h to be less consistent with
+ the .cpp files, but more consistent with the rest of ACE+TAO.
+ Thanks to Johnny to point out the ugliness before it reached the
+ main branch.
+
Sat Apr 25 11:31:50 UTC 2009 Carlos O'Ryan <coryan@atdesk.com>
* tao/Transport.h:
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index 2d1716e32b6..d450945a54a 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -925,6 +925,11 @@ int
TAO_Transport::drain_queue_helper (int &iovcnt, iovec iov[],
TAO::Transport::Drain_Constraints const & dc)
{
+ // As a side-effect, this decrements the timeout() pointed-to value by
+ // the time used in this function. That might be important as there are
+ // potentially long running system calls invoked from here.
+ ACE_Countdown_Time countdown(dc.timeout());
+
size_t byte_count = 0;
// ... send the message ...
diff --git a/TAO/tao/Transport.h b/TAO/tao/Transport.h
index 689b52ef7ee..c3e7f7059a3 100644
--- a/TAO/tao/Transport.h
+++ b/TAO/tao/Transport.h
@@ -114,7 +114,7 @@ namespace TAO
/// Constructor
Drain_Constraints(
- ACE_Time_Value const * timeout,
+ ACE_Time_Value * timeout,
bool block_on_io)
: timeout_(timeout)
, block_on_io_(block_on_io)
@@ -134,13 +134,13 @@ namespace TAO
* The maximum time to block on I/O operations (or nested loops) based
* on the current timeout policies.
*/
- ACE_Time_Value const * timeout() const
+ ACE_Time_Value * timeout() const
{
return timeout_;
}
private:
- ACE_Time_Value const * timeout_;
+ ACE_Time_Value * timeout_;
bool block_on_io_;
};
}
diff --git a/TAO/tests/Bug_3647_Regression/Backend_Impl.cpp b/TAO/tests/Bug_3647_Regression/Backend_Impl.cpp
index 435f8a505ee..213f90b907f 100644
--- a/TAO/tests/Bug_3647_Regression/Backend_Impl.cpp
+++ b/TAO/tests/Bug_3647_Regression/Backend_Impl.cpp
@@ -1,4 +1,4 @@
-#include "Backend_Impl.hpp"
+#include "Backend_Impl.h"
#include "ace/OS.h"
Bug_3647_Regression::Backend_Impl::
@@ -16,7 +16,6 @@ Bug_3647_Regression::Backend_Impl::
void Bug_3647_Regression::Backend_Impl::
startup_test()
- THROW_SPEC (CORBA::SystemException)
{
if (verbose_)
{
@@ -27,7 +26,6 @@ startup_test()
void Bug_3647_Regression::Backend_Impl::
ping(Bug_3647_Regression::Payload const & p)
- THROW_SPEC (CORBA::SystemException)
{
if (verbose_)
{
@@ -39,7 +37,6 @@ ping(Bug_3647_Regression::Payload const & p)
void Bug_3647_Regression::Backend_Impl::
freeze(CORBA::ULong seconds)
- THROW_SPEC (CORBA::SystemException)
{
if (verbose_)
{
@@ -59,7 +56,6 @@ freeze(CORBA::ULong seconds)
void Bug_3647_Regression::Backend_Impl::
shutdown()
- THROW_SPEC (CORBA::SystemException)
{
if (verbose_)
{
diff --git a/TAO/tests/Bug_3647_Regression/Backend_Impl.hpp b/TAO/tests/Bug_3647_Regression/Backend_Impl.h
index fb0dddc35c9..efd8569082e 100644
--- a/TAO/tests/Bug_3647_Regression/Backend_Impl.hpp
+++ b/TAO/tests/Bug_3647_Regression/Backend_Impl.h
@@ -1,8 +1,7 @@
-#ifndef Bug_3647_Regression_Backend_Impl_hpp
-#define Bug_3647_Regression_Backend_Impl_hpp
+#ifndef Bug_3647_Regression_Backend_Impl_h
+#define Bug_3647_Regression_Backend_Impl_h
#include "TestS.h"
-#include "Throw_Spec.h"
namespace Bug_3647_Regression
{
@@ -19,15 +18,11 @@ public:
Backend_Impl(CORBA::ORB_ptr orb, bool verbose);
virtual ~Backend_Impl();
- virtual void startup_test()
- THROW_SPEC (CORBA::SystemException);
- virtual void ping(Bug_3647_Regression::Payload const & the_payload)
- THROW_SPEC (CORBA::SystemException);
- virtual void freeze(CORBA::ULong seconds)
- THROW_SPEC (CORBA::SystemException);
+ virtual void startup_test();
+ virtual void ping(Bug_3647_Regression::Payload const & the_payload);
+ virtual void freeze(CORBA::ULong seconds);
- virtual void shutdown()
- THROW_SPEC (CORBA::SystemException);
+ virtual void shutdown();
private:
/// Keep a reference to the ORB so we can shutdown the application.
@@ -39,4 +34,4 @@ private:
} // namespace Bug_3647_Regression
-#endif // Bug_3647_Regression_Backend_hpp
+#endif // Bug_3647_Regression_Backend_h
diff --git a/TAO/tests/Bug_3647_Regression/Middle_Impl.cpp b/TAO/tests/Bug_3647_Regression/Middle_Impl.cpp
index dcd08d9c068..ca62d2563af 100644
--- a/TAO/tests/Bug_3647_Regression/Middle_Impl.cpp
+++ b/TAO/tests/Bug_3647_Regression/Middle_Impl.cpp
@@ -1,4 +1,4 @@
-#include "Middle_Impl.hpp"
+#include "Middle_Impl.h"
Bug_3647_Regression::Middle_Impl::
Middle_Impl(
@@ -21,7 +21,6 @@ Bug_3647_Regression::Middle_Impl::
void Bug_3647_Regression::Middle_Impl::
startup_test()
- THROW_SPEC (CORBA::SystemException)
{
if (verbose_)
{
@@ -46,7 +45,6 @@ startup_test()
void Bug_3647_Regression::Middle_Impl::
ping()
- THROW_SPEC (CORBA::SystemException)
{
if (verbose_)
{
@@ -77,7 +75,6 @@ ping()
void Bug_3647_Regression::Middle_Impl::
shutdown()
- THROW_SPEC (CORBA::SystemException)
{
if (verbose_)
{
diff --git a/TAO/tests/Bug_3647_Regression/Middle_Impl.hpp b/TAO/tests/Bug_3647_Regression/Middle_Impl.h
index 659a4818723..0435f8a3b7d 100644
--- a/TAO/tests/Bug_3647_Regression/Middle_Impl.hpp
+++ b/TAO/tests/Bug_3647_Regression/Middle_Impl.h
@@ -1,8 +1,7 @@
-#ifndef Bug_3647_Regression_Middle_Impl_hpp
-#define Bug_3647_Regression_Middle_Impl_hpp
+#ifndef Bug_3647_Regression_Middle_Impl_h
+#define Bug_3647_Regression_Middle_Impl_h
#include "TestS.h"
-#include "Throw_Spec.h"
namespace Bug_3647_Regression
{
@@ -23,13 +22,10 @@ public:
long timeout);
virtual ~Middle_Impl();
- virtual void startup_test()
- THROW_SPEC (CORBA::SystemException);
- virtual void ping()
- THROW_SPEC (CORBA::SystemException);
+ virtual void startup_test();
+ virtual void ping();
- virtual void shutdown()
- THROW_SPEC (CORBA::SystemException);
+ virtual void shutdown();
private:
/// Keep a reference to the backend so we can call it, shutdown, etc.
diff --git a/TAO/tests/Bug_3647_Regression/Throw_Spec.h b/TAO/tests/Bug_3647_Regression/Throw_Spec.h
deleted file mode 100644
index 0f29359d965..00000000000
--- a/TAO/tests/Bug_3647_Regression/Throw_Spec.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef Bug_3647_Regression_Throw_Spec_hpp
-#define Bug_3647_Regression_Throw_Spec_hpp
-
-#include "ace/Version.h"
-
-#if ACE_MINOR_VERSION >= 6
-# define THROW_SPEC(X) /**/
-#else
-# define THROW_SPEC(X) throw(X)
-#endif // ACE_MINOR_VERSION
-
-#endif // Bug_3647_Regression_Throw_Spec_hpp
diff --git a/TAO/tests/Bug_3647_Regression/backend_server.cpp b/TAO/tests/Bug_3647_Regression/backend_server.cpp
index 1c7b2ae073d..65e03ea57c6 100644
--- a/TAO/tests/Bug_3647_Regression/backend_server.cpp
+++ b/TAO/tests/Bug_3647_Regression/backend_server.cpp
@@ -1,6 +1,6 @@
// $Id$
-#include "Backend_Impl.hpp"
+#include "Backend_Impl.h"
#include "tao/Strategies/advanced_resource.h"
diff --git a/TAO/tests/Bug_3647_Regression/middle_server.cpp b/TAO/tests/Bug_3647_Regression/middle_server.cpp
index 8ac8a0c8a5f..a60585ab7eb 100644
--- a/TAO/tests/Bug_3647_Regression/middle_server.cpp
+++ b/TAO/tests/Bug_3647_Regression/middle_server.cpp
@@ -1,6 +1,6 @@
// $Id$
-#include "Middle_Impl.hpp"
+#include "Middle_Impl.h"
#include "tao/Utils/PolicyList_Destroyer.h"
#include "tao/Utils/Servant_Var.h"