summaryrefslogtreecommitdiff
path: root/TAO/tao/Transport.cpp
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-04-24 19:49:42 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-04-24 19:49:42 +0000
commit45aff017d6327ebf8862d8f0aff180cdee4aaa9f (patch)
tree74b4dbf07410aa226fa1dd24b6c65610131e3762 /TAO/tao/Transport.cpp
parent832efe98b03beff02d40a07865cefeb49eb54326 (diff)
downloadATCD-45aff017d6327ebf8862d8f0aff180cdee4aaa9f.tar.gz
ChangeLogTag:Tue Apr 24 12:48:19 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/tao/Transport.cpp')
-rw-r--r--TAO/tao/Transport.cpp64
1 files changed, 23 insertions, 41 deletions
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index d0755e59eef..db05799a536 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -144,20 +144,6 @@ TAO_Transport::handle_output ()
flushing_strategy->cancel_output (this);
- if (this->flush_timer_id_ != -1)
- {
- ACE_Event_Handler *eh = this->event_handler_i ();
- if (eh != 0)
- {
- ACE_Reactor *reactor = eh->reactor ();
- if (reactor != 0)
- {
- (void) reactor->cancel_timer (this->flush_timer_id_);
- }
- }
- this->current_deadline_ = ACE_Time_Value::zero;
- this->flush_timer_id_ = -1;
- }
return 0;
}
@@ -747,24 +733,6 @@ TAO_Transport::generate_request_header (
return 0;
}
-
-long
-TAO_Transport::register_for_timer_event (const void* arg,
- const ACE_Time_Value &delay,
- const ACE_Time_Value &interval)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
- guard,
- *this->handler_lock_,
- -1));
-
- ACE_Event_Handler *eh = this->event_handler_i ();
- if (eh == 0)
- return -1;
-
- return this->orb_core_->reactor ()->schedule_timer (eh, arg, delay, interval);
-}
-
int
TAO_Transport::queue_is_empty (void)
{
@@ -846,6 +814,13 @@ int
TAO_Transport::handle_timeout (const ACE_Time_Value & /* current_time */,
const void *act)
{
+ if (TAO_debug_level > 6)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_Transport::handle_timeout, "
+ "timer expired\n"));
+ }
+
/// This is the only legal ACT in the current configuration....
if (act != &this->current_deadline_)
return -1;
@@ -935,9 +910,6 @@ TAO_Transport::drain_queue_helper (int &iovcnt, iovec iov[])
int
TAO_Transport::drain_queue_i (void)
{
- if (this->head_ == 0)
- return 1;
-
// This is the vector used to send data, it must be declared outside
// the loop because after the loop there may still be data to be
// sent
@@ -995,7 +967,22 @@ TAO_Transport::drain_queue_i (void)
}
if (this->head_ == 0)
- return 1;
+ {
+ if (this->flush_timer_pending ())
+ {
+ ACE_Event_Handler *eh = this->event_handler_i ();
+ if (eh != 0)
+ {
+ ACE_Reactor *reactor = eh->reactor ();
+ if (reactor != 0)
+ {
+ (void) reactor->cancel_timer (this->flush_timer_id_);
+ }
+ }
+ this->reset_flush_timer ();
+ }
+ return 1;
+ }
return 0;
}
@@ -1064,11 +1051,6 @@ TAO_Transport::check_buffering_constraints_i (TAO_Stub *stub,
// ... set the new timer, also cancel any previous timers ...
if (set_timer)
{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
- guard,
- *this->handler_lock_,
- -1));
-
ACE_Event_Handler *eh = this->event_handler_i ();
if (eh != 0)
{