summaryrefslogtreecommitdiff
path: root/netsvcs/lib/TS_Clerk_Handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'netsvcs/lib/TS_Clerk_Handler.cpp')
-rw-r--r--netsvcs/lib/TS_Clerk_Handler.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/netsvcs/lib/TS_Clerk_Handler.cpp b/netsvcs/lib/TS_Clerk_Handler.cpp
index 53ce0be1cb2..2f1569c531b 100644
--- a/netsvcs/lib/TS_Clerk_Handler.cpp
+++ b/netsvcs/lib/TS_Clerk_Handler.cpp
@@ -42,7 +42,7 @@ ACE_TS_Clerk_Handler::state (void)
// Sets the timeout delay.
void
-ACE_TS_Clerk_Handler::timeout (long to)
+ACE_TS_Clerk_Handler::timeout (int to)
{
ACE_TRACE (ACE_TEXT ("ACE_TS_Clerk_Handler::timeout"));
if (to > this->max_timeout_)
@@ -54,11 +54,11 @@ ACE_TS_Clerk_Handler::timeout (long to)
// Recalculate the current retry timeout delay using exponential
// backoff. Returns the original timeout (i.e., before the
// recalculation).
-long
+int
ACE_TS_Clerk_Handler::timeout (void)
{
ACE_TRACE (ACE_TEXT ("ACE_TS_Clerk_Handler::timeout"));
- long old_timeout = this->timeout_;
+ int old_timeout = this->timeout_;
this->timeout_ *= 2;
if (this->timeout_ > this->max_timeout_)
@@ -77,14 +77,14 @@ ACE_TS_Clerk_Handler::handle_signal (int, siginfo_t *, ucontext_t *)
// Set the max timeout delay.
void
-ACE_TS_Clerk_Handler::max_timeout (long mto)
+ACE_TS_Clerk_Handler::max_timeout (int mto)
{
ACE_TRACE (ACE_TEXT ("ACE_TS_Clerk_Handler::max_timeout"));
this->max_timeout_ = mto;
}
// Gets the max timeout delay.
-long
+int
ACE_TS_Clerk_Handler::max_timeout (void)
{
ACE_TRACE (ACE_TEXT ("ACE_TS_Clerk_Handler::max_timeout"));
@@ -165,9 +165,8 @@ ACE_TS_Clerk_Handler::reinitiate_connection (void)
ACE_TEXT ("(%t) Scheduling reinitiation of connection\n")));
// Reschedule ourselves to try and connect again.
- ACE_Time_Value const timeout (this->timeout ());
if (ACE_Reactor::instance ()->schedule_timer (this, 0,
- timeout) == -1)
+ this->timeout ()) == -1)
ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%t) %p\n"),
ACE_TEXT ("schedule_timer")), -1);
}
@@ -530,10 +529,9 @@ ACE_TS_Clerk_Processor::initiate_connection (ACE_TS_Clerk_Handler *handler,
// Reschedule ourselves to try and connect again.
if (synch_options[ACE_Synch_Options::USE_REACTOR])
{
- ACE_Time_Value const handler_timeout (handler->timeout ());
if (ACE_Reactor::instance ()->schedule_timer (handler,
0,
- handler_timeout) == -1)
+ handler->timeout ()) == -1)
ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%t) %p\n"),
ACE_TEXT ("schedule_timer")), -1);
}
@@ -568,7 +566,7 @@ ACE_TS_Clerk_Processor::parse_args (int argc, ACE_TCHAR *argv[])
ACE_INET_Addr server_addr;
ACE_TS_Clerk_Handler *handler;
- ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("h:t:p:b"), 0);
+ ACE_Get_Arg_Opt<ACE_TCHAR> get_opt (argc, argv, ACE_TEXT ("h:t:p:b"), 0);
for (int c; (c = get_opt ()) != -1; )
{