summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfhunleth <fhunleth@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-05-04 19:03:04 +0000
committerfhunleth <fhunleth@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-05-04 19:03:04 +0000
commit3088f667f6380a52f64f72b6cd4fa7a9ae21028b (patch)
treee04cf441a89b5294cf941a083a118916f331a281
parent504dfb49fa9b0b098b463e30648b4fb59a09dba5 (diff)
downloadATCD-3088f667f6380a52f64f72b6cd4fa7a9ae21028b.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/PortableGroup/UIPMC_Acceptor.cpp10
-rw-r--r--TAO/tao/PortableGroup/UIPMC_Connection_Handler.cpp9
-rw-r--r--TAO/tao/PortableGroup/UIPMC_Connector.cpp2
-rw-r--r--TAO/tao/PortableGroup/UIPMC_Connector.h13
-rw-r--r--TAO/tao/PortableGroup/UIPMC_Transport.cpp2
5 files changed, 24 insertions, 12 deletions
diff --git a/TAO/tao/PortableGroup/UIPMC_Acceptor.cpp b/TAO/tao/PortableGroup/UIPMC_Acceptor.cpp
index ca1d5b42490..bcfe5f1111f 100644
--- a/TAO/tao/PortableGroup/UIPMC_Acceptor.cpp
+++ b/TAO/tao/PortableGroup/UIPMC_Acceptor.cpp
@@ -87,6 +87,9 @@ TAO_UIPMC_Acceptor::is_collocated (const TAO_Endpoint *endpoint)
int
TAO_UIPMC_Acceptor::close (void)
{
+/*
+ // @@ Frank: Commented out since it seems like the reactor always is the one to
+ // remove the connection handler.
if (this->connection_handler_)
{
// Remove the connection handler from the reactor in the case
@@ -103,6 +106,7 @@ TAO_UIPMC_Acceptor::close (void)
}
this->connection_handler_ = 0;
}
+ */
return 0;
}
@@ -211,6 +215,12 @@ TAO_UIPMC_Acceptor::open_i (const ACE_INET_Addr& addr)
{
this->orb_core_->reactor ()->register_handler (this->connection_handler_,
ACE_Event_Handler::READ_MASK);
+
+ // Add the connection handler to cache
+ this->connection_handler_->add_transport_to_cache ();
+
+ // Set the flag in the Connection Handler and in the Wait Strategy
+ this->connection_handler_->transport ()->wait_strategy ()->is_registered (1);
}
// Set the port for each addr. If there is more than one network
diff --git a/TAO/tao/PortableGroup/UIPMC_Connection_Handler.cpp b/TAO/tao/PortableGroup/UIPMC_Connection_Handler.cpp
index 2cb6a63dd4d..746a254a626 100644
--- a/TAO/tao/PortableGroup/UIPMC_Connection_Handler.cpp
+++ b/TAO/tao/PortableGroup/UIPMC_Connection_Handler.cpp
@@ -278,11 +278,12 @@ TAO_UIPMC_Connection_Handler::add_transport_to_cache (void)
{
ACE_INET_Addr addr;
- // Get the peername.
- if (this->peer ().get_remote_addr (addr) == -1)
- return -1;
+ // This function is called by the acceptor to add this
+ // transport to the transport cache. This is really
+ // important for proper shutdown. The address used
+ // is irrelevent, since UIPMC is connectionless.
- // Construct a UIPMC_Endpoint object
+ // Construct a UIPMC_Endpoint object.
TAO_UIPMC_Endpoint endpoint (addr);
// Construct a property object
diff --git a/TAO/tao/PortableGroup/UIPMC_Connector.cpp b/TAO/tao/PortableGroup/UIPMC_Connector.cpp
index e9ce1ef460c..6c2ead8e2a3 100644
--- a/TAO/tao/PortableGroup/UIPMC_Connector.cpp
+++ b/TAO/tao/PortableGroup/UIPMC_Connector.cpp
@@ -90,7 +90,7 @@ TAO_UIPMC_Connector::connect (TAO_Transport_Descriptor_Interface *desc,
TAO_UIPMC_Connection_Handler *svc_handler = 0;
// @@ Michael -- UIPMC Additions ----------------------------
- if (svc_handler_table_.find (remote_address, svc_handler) == -1)
+ if (this->svc_handler_table_.find (remote_address, svc_handler) == -1)
{
TAO_UIPMC_Connection_Handler *svc_handler_i = 0;
ACE_NEW_RETURN (svc_handler_i,
diff --git a/TAO/tao/PortableGroup/UIPMC_Connector.h b/TAO/tao/PortableGroup/UIPMC_Connector.h
index 735076a388b..e051b057fec 100644
--- a/TAO/tao/PortableGroup/UIPMC_Connector.h
+++ b/TAO/tao/PortableGroup/UIPMC_Connector.h
@@ -98,17 +98,18 @@ protected:
private:
// @@ Michael: UDP Addition
- ACE_Hash_Map_Manager_Ex < ACE_TCHAR *,
+ ACE_Hash_Map_Manager_Ex < ACE_INET_Addr,
TAO_UIPMC_Connection_Handler *,
- ACE_Hash < const char * >,
- ACE_Equal_To < const char * >,
+ ACE_Hash < ACE_INET_Addr >,
+ ACE_Equal_To < ACE_INET_Addr >,
ACE_Null_Mutex > svc_handler_table_;
- typedef ACE_Hash_Map_Iterator_Ex < ACE_TCHAR *,
+ typedef ACE_Hash_Map_Iterator_Ex < ACE_INET_Addr,
TAO_UIPMC_Connection_Handler *,
- ACE_Hash < const char * >,
- ACE_Equal_To < const char *>,
+ ACE_Hash < ACE_INET_Addr >,
+ ACE_Equal_To < ACE_INET_Addr >,
ACE_Null_Mutex > SvcHandlerIterator;
+
};
#include "ace/post.h"
diff --git a/TAO/tao/PortableGroup/UIPMC_Transport.cpp b/TAO/tao/PortableGroup/UIPMC_Transport.cpp
index 7f59f589f37..2c272c3c014 100644
--- a/TAO/tao/PortableGroup/UIPMC_Transport.cpp
+++ b/TAO/tao/PortableGroup/UIPMC_Transport.cpp
@@ -377,7 +377,7 @@ TAO_UIPMC_Transport::recv_i (char *buf,
// Trim off the header for now.
n -= MIOP_HEADER_SIZE;
- ACE_OS::memcpy (buf, buf + MIOP_HEADER_SIZE, n);
+ ACE_OS::memmove (buf, buf + MIOP_HEADER_SIZE, n);
return n;
}