summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2005-03-21 12:56:50 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2005-03-21 12:56:50 +0000
commit189dcb302f2e7b6ff9bd95916c45a79d066d7df5 (patch)
tree9db30145c04243285568226114e366784ba0755f
parentdef8d840247f0f62928343d55d50b7ca6e3f6881 (diff)
downloadATCD-189dcb302f2e7b6ff9bd95916c45a79d066d7df5.tar.gz
ChangeLogTag: Mon Mar 21 06:56:10 2005 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--TAO/ChangeLog64
-rw-r--r--TAO/tao/IIOP_Connection_Handler.cpp24
-rw-r--r--TAO/tao/ORB_Core.cpp10
-rw-r--r--TAO/tao/params.cpp1
-rw-r--r--TAO/tao/params.h7
-rw-r--r--TAO/tao/params.i13
6 files changed, 93 insertions, 26 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 4325eb62424..fa93b35eeba 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,15 @@
+Mon Mar 21 06:56:10 2005 Chad Elliott <elliott_c@ociweb.com>
+
+ * tao/IIOP_Connection_Handler.cpp:
+ * tao/ORB_Core.cpp:
+ * tao/params.h:
+ * tao/params.i:
+ * tao/params.cpp:
+
+ Added a new ORB option, -ORBLingerTimeout, that allows the user to
+ set the linger timeout on a TCP socket before closing. The
+ default is to not modify the linger timeout.
+
Mon Mar 21 12:15:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
* tao/IIOP_Connection_Handler.cpp:
@@ -22,9 +34,9 @@ Mon Mar 21 09:16:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
Sun Mar 20 08:53:48 2005 Gan Deng <dengg@dre.vanderbilt.edu>
- * tao/RTCORBA/RT_Stub.cpp:
+ * tao/RTCORBA/RT_Stub.cpp:
- Fixed compilation warnings by adding .in() to the _var type.
+ Fixed compilation warnings by adding .in() to the _var type.
Sat Mar 19 13:34:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
@@ -59,47 +71,47 @@ Fri Mar 18 20:52:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
Fri Mar 18 11:48:48 2005 Gan Deng <dengg@dre.vanderbilt.edu>
- * tao/RTCORBA/RT_Stub.h:
+ * tao/RTCORBA/RT_Stub.h:
- Changed the member variables defined in the RT_Stub class
- from pointer type to "_var" type to avoid memory leak.
- Thanks Roland Schmimmack <Roland.Schmimmack@gmx.de> for
- reporting the memory leak problem.
+ Changed the member variables defined in the RT_Stub class
+ from pointer type to "_var" type to avoid memory leak.
+ Thanks Roland Schmimmack <Roland.Schmimmack@gmx.de> for
+ reporting the memory leak problem.
Fri Mar 18 10:58:48 2005 Balachandran Natarajan <bala@dre.vanderbilt.edu>
- * docs/Options.html (below):
+ * docs/Options.html (below):
- Added documentation for -ORBDropRepliesonShutdown.
+ Added documentation for -ORBDropRepliesonShutdown.
Fri Mar 18 10:36:32 2005 Balachandran Natarajan <bala@dre.vanderbilt.edu>
- * orbsvcs/tests/EC_Custom_Marshal/svc.conf:
- * orbsvcs/tests/EC_Throughput/ec.conf:
+ * orbsvcs/tests/EC_Custom_Marshal/svc.conf:
+ * orbsvcs/tests/EC_Throughput/ec.conf:
- These two tests require that the ORB not drop replies during
- shutdown. Therefore added that strategy. If this strategy is
- not used EC would exit with a COMM_FAILURE exception.
+ These two tests require that the ORB not drop replies during
+ shutdown. Therefore added that strategy. If this strategy is
+ not used EC would exit with a COMM_FAILURE exception.
Fri Mar 18 10:34:48 2005 Balachandran Natarajan <bala@dre.vanderbilt.edu>
- * tao/Transport.cpp:
- * tao/Transport.h (provide_blockable_handler):
+ * tao/Transport.cpp:
+ * tao/Transport.h (provide_blockable_handler):
- Return a bool instead of void.
+ Return a bool instead of void.
- * tao/Transport_Cache_Manager.cpp:
+ * tao/Transport_Cache_Manager.cpp:
- Check for the return value from provide_blockable_handler before
- marking the entry as closed.
+ Check for the return value from provide_blockable_handler before
+ marking the entry as closed.
Fri Mar 18 09:26:32 2005 Balachandran Natarajan <bala@dre.vanderbilt.edu>
- * tests/Faults/client.cpp:
+ * tests/Faults/client.cpp:
- Added an additional check to omit COMM_FAILURE exceptions when
+ Added an additional check to omit COMM_FAILURE exceptions when
doing a self shutdown test. This shoudl address test failures in
- our daily builds.
+ our daily builds.
Fri Mar 18 10:53:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
@@ -121,10 +133,10 @@ Fri Mar 18 09:18:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
Thu Mar 17 11:00:57 2005 J.T. Conklin <jtc@acorntoolworks.com>
- * configure.ac:
+ * configure.ac:
- Add no-define to AC_INIT_AUTOMAKE so that PLATFORM and VERSION
- are not defined in config.h.
+ Add no-define to AC_INIT_AUTOMAKE so that PLATFORM and VERSION
+ are not defined in config.h.
Thu Mar 17 09:02:28 2005 Ciju John <john_c@ociweb.com>
diff --git a/TAO/tao/IIOP_Connection_Handler.cpp b/TAO/tao/IIOP_Connection_Handler.cpp
index 4069f433e2c..ed6e0d1d808 100644
--- a/TAO/tao/IIOP_Connection_Handler.cpp
+++ b/TAO/tao/IIOP_Connection_Handler.cpp
@@ -199,6 +199,30 @@ TAO_IIOP_Connection_Handler::resume_handler (void)
int
TAO_IIOP_Connection_Handler::close_connection (void)
{
+ // To maintain maximum compatibility, we only set this socket option
+ // if the user has provided a linger timeout.
+ int linger = this->orb_core()->orb_params()->linger ();
+ if (linger != -1)
+ {
+ struct linger lval;
+ lval.l_onoff = 1;
+ lval.l_linger = linger;
+
+ if (this->peer ().set_option(SOL_SOCKET,
+ SO_LINGER,
+ (void*) &lval,
+ sizeof (lval)) == -1)
+ {
+ if (TAO_debug_level)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_LIB_TEXT ("TAO (%P|%t) Unable to set ")
+ ACE_LIB_TEXT ("SO_LINGER on %d\n"),
+ this->peer ().get_handle ()));
+ }
+ }
+ }
+
return this->close_connection_eh (this);
}
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index 9a1b4b524c5..a24c9eb7a47 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -313,6 +313,8 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
int std_profile_components = 0;
#endif /* TAO_STD_PROFILE_COMPONENTS */
+ int linger = -1;
+
// Copy command line parameter not to use original.
ACE_Argv_Type_Converter command_line (argc, argv);
@@ -735,6 +737,13 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
arg_shifter.consume_arg ();
}
else if ((current_arg = arg_shifter.get_the_parameter
+ (ACE_LIB_TEXT("-ORBLingerTimeout"))))
+ {
+ linger = ACE_OS::atoi (current_arg);
+
+ arg_shifter.consume_arg ();
+ }
+ else if ((current_arg = arg_shifter.get_the_parameter
(ACE_TEXT("-ORBEndpoint"))))
{
// Each "endpoint" is of the form:
@@ -1070,6 +1079,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
this->orb_params ()->service_port (IMPLREPOSERVICE, ir_port);
this->orb_params ()->use_dotted_decimal_addresses (dotted_decimal_addresses);
+ this->orb_params ()->linger (linger);
this->orb_params ()->nodelay (nodelay);
if (rcv_sock_size >= 0)
this->orb_params ()->sock_rcvbuf_size (rcv_sock_size);
diff --git a/TAO/tao/params.cpp b/TAO/tao/params.cpp
index 562156fbae1..3c5e7b57655 100644
--- a/TAO/tao/params.cpp
+++ b/TAO/tao/params.cpp
@@ -24,6 +24,7 @@ TAO_ORB_Parameters::TAO_ORB_Parameters (void)
, cdr_memcpy_tradeoff_ (ACE_DEFAULT_CDR_MEMCPY_TRADEOFF)
, use_lite_protocol_ (0)
, use_dotted_decimal_addresses_ (0)
+ , linger_ (-1)
, std_profile_components_ (1)
, ace_sched_policy_ (ACE_SCHED_OTHER)
, sched_policy_ (THR_SCHED_DEFAULT)
diff --git a/TAO/tao/params.h b/TAO/tao/params.h
index ace616f791f..1b57162536d 100644
--- a/TAO/tao/params.h
+++ b/TAO/tao/params.h
@@ -114,6 +114,10 @@ public:
int use_dotted_decimal_addresses (void) const;
void use_dotted_decimal_addresses (int);
+ /// The ORB will turn off SO_LINGER if this is zero.
+ int linger (void) const;
+ void linger (int);
+
/// Set/Get the Init Reference of an arbitrary ObjectID.
char *default_init_ref (void) const;
void default_init_ref (const char *default_init_ref);
@@ -230,6 +234,9 @@ private:
/// For selecting a address notation
int use_dotted_decimal_addresses_;
+ /// For setting the SO_LINGER option
+ int linger_;
+
/// If true then the standard OMG components are not generated.
int std_profile_components_;
diff --git a/TAO/tao/params.i b/TAO/tao/params.i
index 0a5190d8912..bcf7579dc83 100644
--- a/TAO/tao/params.i
+++ b/TAO/tao/params.i
@@ -49,6 +49,19 @@ TAO_ORB_Parameters::use_dotted_decimal_addresses (int x)
}
+ACE_INLINE int
+TAO_ORB_Parameters::linger (void) const
+{
+ return this->linger_;
+}
+
+ACE_INLINE void
+TAO_ORB_Parameters::linger (int x)
+{
+ this->linger_ = x;
+}
+
+
ACE_INLINE void
TAO_ORB_Parameters::service_port (TAO_MCAST_SERVICEID service_id,
CORBA::UShort port)