summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2003-02-12 20:25:53 +0000
committerbala <balanatarajan@users.noreply.github.com>2003-02-12 20:25:53 +0000
commit9b905de55407b2bbc88c5e9a073a030a57a95182 (patch)
tree5e6fc02b2a0551d4b76f5880cfd20378e55253b4
parent5433a696c9ca76aa4608d43c6ef3a87336d2cd1f (diff)
downloadATCD-9b905de55407b2bbc88c5e9a073a030a57a95182.tar.gz
ChangeLogTag: Wed Feb 12 14:58:46 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
-rw-r--r--TAO/ChangeLog13
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp48
-rw-r--r--TAO/tao/IIOP_Transport.cpp66
-rw-r--r--TAO/tao/Transport.h6
4 files changed, 102 insertions, 31 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 57927a38ee1..621e137b651 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,15 @@
+Wed Feb 12 14:58:46 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
+
+ * tao/IIOP_Transport.cpp: Methods tear_listen_point_list () and
+ get_listen_point () accessed the connection_handler without any
+ protection and violated the protocol that was set in pre-1.2
+ timeframe.
+
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp: Same changes as
+ above. This code needs refactoring.
+
+ * tao/Transport.h: Cosmetic fix.
+
Wed Feb 12 12:32:57 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
* tests/RTCORBA/Client_Protocol/svc.conf:
@@ -10,7 +22,6 @@ Wed Feb 12 12:32:57 2003 Balachandran Natarajan <bala@isis-server.isis.vanderb
files. This should fix the problems that shows up in our daily
builds.
-
Wed Feb 12 12:14:13 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
* utils/catior/catior.cpp: Fixed a warning in g++ builds.
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
index 9e04e168a8a..baa8bc86b66 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
@@ -285,6 +285,18 @@ TAO_SSLIOP_Transport::tear_listen_point_list (TAO_InputCDR &cdr)
// As we have received a bidirectional information, set the flag to
// 1
this->bidirectional_flag (1);
+
+ // Just make sure that the connection handler is sane before we go
+ // head and do anything with it.
+ ACE_GUARD_RETURN (ACE_Lock,
+ ace_mon,
+ *this->handler_lock_,
+ -1);
+
+ if (this->check_event_handler_i ("SSLIOP_Transport::tear_listen_point_list")
+ == -1)
+ return -1;
+
return this->connection_handler_->process_listen_point_list (listen_list);
}
@@ -311,8 +323,15 @@ TAO_SSLIOP_Transport::set_bidir_context_info (TAO_Operation_Details &opdetails)
// Check whether it is a IIOP acceptor
if ((*acceptor)->tag () == IOP::TAG_INTERNET_IOP)
{
- this->get_listen_point (listen_point_list,
- *acceptor);
+ if (this->get_listen_point (listen_point_list,
+ *acceptor) == -1)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "TAO (%P|%t) - SSLIOP_Transport::set_bidir_info, ",
+ "error getting listen_point \n"));
+
+ return;
+ }
}
}
@@ -359,16 +378,29 @@ TAO_SSLIOP_Transport::get_listen_point (
// Get the local address of the connection
ACE_INET_Addr local_addr;
+ {
+ // Just make sure that the connection handler is sane before we go
+ // head and do anything with it.
+ ACE_GUARD_RETURN (ACE_Lock,
+ ace_mon,
+ *this->handler_lock_,
+ -1);
+
+ if (this->check_event_handler_i ("SSLIOP_Transport::get_listen_point")
+ == -1)
+ return -1;
- if (this->connection_handler_->peer ().get_local_addr (local_addr)
- == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) Could not resolve local host")
- ACE_TEXT (" address in get_listen_point()\n")),
+ if (this->connection_handler_->peer ().get_local_addr (local_addr)
+ == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) Could not resolve local host")
+ ACE_TEXT (" address in get_listen_point()\n")),
-1);
}
+ }
+
// Note: Looks like there is no point in sending the list of
// endpoints on interfaces on which this connection has not
// been established. If this is wrong, please correct me.
diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp
index b7185472584..d825b781352 100644
--- a/TAO/tao/IIOP_Transport.cpp
+++ b/TAO/tao/IIOP_Transport.cpp
@@ -180,12 +180,11 @@ TAO_IIOP_Transport::send_request (TAO_Stub *stub,
if (tph != 0)
{
- /*
- int send_buffer_size;
- int recv_buffer_size;
- int no_delay;
- int enable_network_priority;
- */
+ ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->handler_lock_, -1);
+
+ if (this->check_event_handler_i ("IIOP_Transport::send_request")
+ == -1)
+ return -1;
const char protocol[] = "iiop";
const char * protocol_type = protocol;
@@ -268,7 +267,7 @@ TAO_IIOP_Transport::send_message_shared (TAO_Stub *stub,
{
ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->handler_lock_, -1);
- if (this->check_event_handler_i ("Transport::send_message_shared") == -1)
+ if (this->check_event_handler_i ("IIOP_Transport::send_message_shared") == -1)
return -1;
if (TAO_debug_level > 6)
@@ -346,6 +345,18 @@ TAO_IIOP_Transport::tear_listen_point_list (TAO_InputCDR &cdr)
// As we have received a bidirectional information, set the flag to
// 1 (i.e., non-originating side)
this->bidirectional_flag (1);
+
+ // Just make sure that the connection handler is sane before we go
+ // head and do anything with it.
+ ACE_GUARD_RETURN (ACE_Lock,
+ ace_mon,
+ *this->handler_lock_,
+ -1);
+
+ if (this->check_event_handler_i ("IIOP_Transport::tear_listen_point_list")
+ == -1)
+ return -1;
+
return this->connection_handler_->process_listen_point_list (listen_list);
}
@@ -368,10 +379,15 @@ TAO_IIOP_Transport::set_bidir_context_info (TAO_Operation_Details &opdetails)
// Check whether it is a IIOP acceptor
if ((*acceptor)->tag () == IOP::TAG_INTERNET_IOP)
{
- // @@ Why isn't the return value checked!
- // -Ossama
- this->get_listen_point (listen_point_list,
- *acceptor);
+ if (this->get_listen_point (listen_point_list,
+ *acceptor) == -1)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "TAO (%P|%t) - IIOP_Transport::set_bidir_info, ",
+ "error getting listen_point \n"));
+
+ return;
+ }
}
}
@@ -410,16 +426,28 @@ TAO_IIOP_Transport::get_listen_point (
// Get the local address of the connection
ACE_INET_Addr local_addr;
+ {
+ // Just make sure that the connection handler is sane before we go
+ // head and do anything with it.
+ ACE_GUARD_RETURN (ACE_Lock,
+ ace_mon,
+ *this->handler_lock_,
+ -1);
+
+ if (this->check_event_handler_i ("IIOP_Transport::get_listen_point")
+ == -1)
+ return -1;
- if (this->connection_handler_->peer ().get_local_addr (local_addr)
- == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) Could not resolve local ")
+ if (this->connection_handler_->peer ().get_local_addr (local_addr)
+ == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) Could not resolve local ")
ACE_TEXT ("host address in ")
- ACE_TEXT ("get_listen_point()\n")),
- -1);
- }
+ ACE_TEXT ("get_listen_point()\n")),
+ -1);
+ }
+ }
// Note: Looks like there is no point in sending the list of
// endpoints on interfaces on which this connection has not
diff --git a/TAO/tao/Transport.h b/TAO/tao/Transport.h
index 31ebe4e18a9..25716816651 100644
--- a/TAO/tao/Transport.h
+++ b/TAO/tao/Transport.h
@@ -631,9 +631,9 @@ public:
* block, used in the implementation of timeouts.
*/
virtual int send_message_shared (TAO_Stub *stub,
- int message_semantics,
- const ACE_Message_Block *message_block,
- ACE_Time_Value *max_wait_time);
+ int message_semantics,
+ const ACE_Message_Block *message_block,
+ ACE_Time_Value *max_wait_time);
protected: