summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Mitz <mitza-oci@users.noreply.github.com>2009-06-12 14:31:48 +0000
committerAdam Mitz <mitza-oci@users.noreply.github.com>2009-06-12 14:31:48 +0000
commit1a16508c8199d5ee0dcb88931066b4a43882f7a5 (patch)
tree318ddadb32edaed4f8625884907a6167e96b3fcd
parent7bc28249952404245815d7c1879c8be9ad90a600 (diff)
downloadATCD-1a16508c8199d5ee0dcb88931066b4a43882f7a5.tar.gz
ChangeLogTag: Fri Jun 12 14:29:55 UTC 2009 Adam Mitz <mitza@ociweb.com>
-rw-r--r--TAO/ChangeLog15
-rw-r--r--TAO/tao/Block_Flushing_Strategy.cpp6
-rw-r--r--TAO/tao/Block_Flushing_Strategy.h1
-rw-r--r--TAO/tao/Flushing_Strategy.cpp6
-rw-r--r--TAO/tao/Flushing_Strategy.h2
-rw-r--r--TAO/tao/Transport.cpp10
6 files changed, 39 insertions, 1 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index b0b609466db..5e64e076363 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,8 +1,21 @@
+Fri Jun 12 14:29:55 UTC 2009 Adam Mitz <mitza@ociweb.com>
+
+ * tao/Block_Flushing_Strategy.h:
+ * tao/Block_Flushing_Strategy.cpp:
+ * tao/Flushing_Strategy.h:
+ * tao/Flushing_Strategy.cpp:
+ * tao/Transport.cpp:
+
+ If send() returns -1 with EWOULDBLOCK and the Flushing Strategy is
+ blocking, return -1 instead of 0. This is an error condition and
+ the transport must be closed to avoid looping indefinitely in the
+ flushing strategy's flush_transport().
+
Fri Jun 12 11:16:39 UTC 2009 Olli Savia <ops@iki.fi>
* utils/logWalker/Invocation.cpp:
Fixed memset's parameter order.
-
+
Fri Jun 12 10:25:58 UTC 2009 Phil Mesnier <mesnier_p@ociweb.com>
* utils/logWalker/Invocation.cpp:
diff --git a/TAO/tao/Block_Flushing_Strategy.cpp b/TAO/tao/Block_Flushing_Strategy.cpp
index 397e4717006..f763f46cc3d 100644
--- a/TAO/tao/Block_Flushing_Strategy.cpp
+++ b/TAO/tao/Block_Flushing_Strategy.cpp
@@ -49,4 +49,10 @@ TAO_Block_Flushing_Strategy::flush_transport (TAO_Transport *transport,
return 0;
}
+bool TAO_Block_Flushing_Strategy::is_blocking ()
+{
+ return true;
+}
+
+
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Block_Flushing_Strategy.h b/TAO/tao/Block_Flushing_Strategy.h
index b82ec8db0ee..2f94f4f45b9 100644
--- a/TAO/tao/Block_Flushing_Strategy.h
+++ b/TAO/tao/Block_Flushing_Strategy.h
@@ -37,6 +37,7 @@ public:
ACE_Time_Value *max_wait_time);
virtual int flush_transport (TAO_Transport *transport
, ACE_Time_Value *max_wait_time);
+ virtual bool is_blocking ();
};
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Flushing_Strategy.cpp b/TAO/tao/Flushing_Strategy.cpp
index 6d66ee99975..72024d924da 100644
--- a/TAO/tao/Flushing_Strategy.cpp
+++ b/TAO/tao/Flushing_Strategy.cpp
@@ -13,4 +13,10 @@ TAO_Flushing_Strategy::~TAO_Flushing_Strategy (void)
{
}
+bool TAO_Flushing_Strategy::is_blocking ()
+{
+ return false;
+}
+
+
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Flushing_Strategy.h b/TAO/tao/Flushing_Strategy.h
index 4bcab3d5589..4787c63c51d 100644
--- a/TAO/tao/Flushing_Strategy.h
+++ b/TAO/tao/Flushing_Strategy.h
@@ -76,6 +76,8 @@ public:
/// Wait until the transport has no messages queued.
virtual int flush_transport (TAO_Transport *transport, ACE_Time_Value *max_wait_time) = 0;
+
+ virtual bool is_blocking ();
};
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index 9494364a241..ea6e73f1382 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -987,6 +987,16 @@ TAO_Transport::drain_queue_helper (int &iovcnt, iovec iov[],
if (errno == EWOULDBLOCK || errno == EAGAIN)
{
+ if (this->orb_core ()->flushing_strategy ()->is_blocking ())
+ {
+ // If the flushing strategy has "blocking" behavior, we can't
+ // return 0 here because it would loop indefinitely calling
+ // back into handle_output() and returning EWOULDBLOCK.
+ // This is an error condition because TAO can't handle an
+ // EWOULDBLOCK with a blocking flushing strategy.
+ return -1;
+ }
+
return 0;
}