summaryrefslogtreecommitdiff
path: root/TAO/tao/Wait_On_Read.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Wait_On_Read.cpp')
-rw-r--r--TAO/tao/Wait_On_Read.cpp25
1 files changed, 7 insertions, 18 deletions
diff --git a/TAO/tao/Wait_On_Read.cpp b/TAO/tao/Wait_On_Read.cpp
index 6e82919b65b..3320298e49d 100644
--- a/TAO/tao/Wait_On_Read.cpp
+++ b/TAO/tao/Wait_On_Read.cpp
@@ -1,9 +1,7 @@
// $Id$
#include "tao/Wait_On_Read.h"
-#include "tao/Transport.h"
-#include "tao/Resume_Handle.h"
-#include "tao/Synch_Reply_Dispatcher.h"
+#include "Transport.h"
ACE_RCSID(tao, Wait_On_Read, "$Id$")
@@ -21,24 +19,21 @@ TAO_Wait_On_Read::~TAO_Wait_On_Read (void)
// Wait on the read operation.
int
TAO_Wait_On_Read::wait (ACE_Time_Value * max_wait_time,
- TAO_Synch_Reply_Dispatcher &rd)
+ int &reply_received)
{
- rd.state_changed (TAO_LF_Event::LFS_ACTIVE);
+ reply_received = 0;
// Do the same sort of looping that is done in other wait
// strategies.
int retval = 0;
- TAO_Resume_Handle rh;
while (1)
{
retval =
- this->transport_->handle_input_i (rh,
- max_wait_time,
- 1);
+ this->transport_->read_process_message (max_wait_time, 1);
// If we got our reply, no need to run the loop any
// further.
- if (!rd.keep_waiting ())
+ if (reply_received)
break;
// @@ We are not checking for timeouts here...
@@ -48,18 +43,12 @@ TAO_Wait_On_Read::wait (ACE_Time_Value * max_wait_time,
break;
}
- if (rd.error_detected () == -1 || retval == -1)
+ if (reply_received == -1 || retval == -1)
{
this->transport_->close_connection ();
}
- if (rd.successful ())
- return 0;
-
- if (rd.error_detected ())
- return -1;
-
- return 1;
+ return (reply_received == 1 ? 0 : reply_received);
}
// No-op.