diff options
author | johnc <johnc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-02-07 22:58:21 +0000 |
---|---|---|
committer | johnc <johnc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-02-07 22:58:21 +0000 |
commit | 7018a2dc7f818edbe6d6e287888d6b43f27fd983 (patch) | |
tree | 3a187fcc91dcf7ca1038b68b3eb2b4d08e213ec8 /TAO/tao/Reactive_Flushing_Strategy.cpp | |
parent | e005e3e9c912d512d112f690b1f10c27efca66bb (diff) | |
download | ATCD-7018a2dc7f818edbe6d6e287888d6b43f27fd983.tar.gz |
ChangeLogTag: Thu Feb 7 22:49:48 UTC 2008 Ciju John <johnc at ociweb dot com>
Diffstat (limited to 'TAO/tao/Reactive_Flushing_Strategy.cpp')
-rw-r--r-- | TAO/tao/Reactive_Flushing_Strategy.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/TAO/tao/Reactive_Flushing_Strategy.cpp b/TAO/tao/Reactive_Flushing_Strategy.cpp index 13060233926..9a9bb0f4954 100644 --- a/TAO/tao/Reactive_Flushing_Strategy.cpp +++ b/TAO/tao/Reactive_Flushing_Strategy.cpp @@ -6,6 +6,8 @@ #include "tao/ORB_Core.h" #include "tao/Queued_Message.h" +#include "ace/High_Res_Timer.h" + ACE_RCSID (tao, Reactive_Flushing_Strategy, "$Id$") @@ -40,6 +42,13 @@ TAO_Reactive_Flushing_Strategy::flush_message (TAO_Transport *transport, while (!msg->all_data_sent () && result >= 0) { result = orb_core->run (max_wait_time, 1); + + if (max_wait_time != 0) { + if (*max_wait_time <= ACE_Time_Value::zero) { + errno = ETIME; + result = -1; + } + } } } catch (const ::CORBA::Exception&) @@ -54,7 +63,6 @@ int TAO_Reactive_Flushing_Strategy::flush_transport (TAO_Transport *transport , ACE_Time_Value *max_wait_time) { - // @@ Should we pass this down? Can we? try { TAO_ORB_Core * const orb_core = transport->orb_core (); @@ -63,6 +71,13 @@ TAO_Reactive_Flushing_Strategy::flush_transport (TAO_Transport *transport { if (orb_core->run (max_wait_time, 1) == -1) return -1; + + if (max_wait_time != 0) { + if (*max_wait_time <= ACE_Time_Value::zero) { + errno = ETIME; + return -1; + } + } } } catch (const ::CORBA::Exception&) |