summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-04 05:34:25 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-04 05:34:25 +0000
commitc07fd17fc670d0ab9cdadbef2c23b86fc4fd729b (patch)
tree2690e896a1e04e7b4dda677e85c20103c16daa09
parent30cc447a5b80de49b21340a3eb1dcecd9d43991c (diff)
downloadATCD-c07fd17fc670d0ab9cdadbef2c23b86fc4fd729b.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/SHMIOP_Connector.cpp43
-rw-r--r--TAO/tao/SHMIOP_Connector.h2
-rw-r--r--ace/MEM_Connector.cpp13
-rw-r--r--ace/MEM_Connector.h8
-rw-r--r--ace/OS.h4
-rw-r--r--examples/IPC_SAP/SOCK_SAP/CPP-memclient.cpp3
-rw-r--r--examples/IPC_SAP/SOCK_SAP/CPP-memserver.cpp4
7 files changed, 36 insertions, 41 deletions
diff --git a/TAO/tao/SHMIOP_Connector.cpp b/TAO/tao/SHMIOP_Connector.cpp
index 7f393521804..d36bec7a85a 100644
--- a/TAO/tao/SHMIOP_Connector.cpp
+++ b/TAO/tao/SHMIOP_Connector.cpp
@@ -113,7 +113,7 @@ TAO_SHMIOP_Connector::make_caching_strategy (void)
#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT)
#define TAO_SVC_TUPLE ACE_Svc_Tuple<TAO_SHMIOP_Client_Connection_Handler>
#define CACHED_CONNECT_STRATEGY ACE_Cached_Connect_Strategy<TAO_SHMIOP_Client_Connection_Handler, ACE_MEM_CONNECTOR, TAO_Cached_Connector_Lock>
-#define TAO_ADDR ACE_Refcounted_Hash_Recyclable<ACE_MEM_Addr>
+#define TAO_ADDR ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr>
#define TAO_HANDLER TAO_SHMIOP_Client_Connection_Handler
#define TAO_HASH_KEY ACE_Hash<TAO_ADDR>
#define TAO_COMPARE_KEYS ACE_Equal_To<TAO_ADDR>
@@ -127,9 +127,9 @@ template class ACE_Auto_Basic_Array_Ptr<TAO_SHMIOP_Client_Connection_Handler*>;
template class auto_ptr<TAO_SHMIOP_Connect_Creation_Strategy>;
template class ACE_Auto_Basic_Ptr<TAO_SHMIOP_Connect_Creation_Strategy>;
-template class ACE_Node<ACE_MEM_Addr>;
-template class ACE_Unbounded_Stack<ACE_MEM_Addr>;
-template class ACE_Unbounded_Stack_Iterator<ACE_MEM_Addr>;
+template class ACE_Node<ACE_INET_Addr>;
+template class ACE_Unbounded_Stack<ACE_INET_Addr>;
+template class ACE_Unbounded_Stack_Iterator<ACE_INET_Addr>;
#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT)
template class CACHED_CONNECT_STRATEGY;
@@ -137,15 +137,15 @@ template class TAO_ADDR;
#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
template class ACE_Svc_Handler<ACE_MEM_STREAM, ACE_NULL_SYNCH>;
-template class ACE_Refcounted_Hash_Recyclable<ACE_MEM_Addr>;
+template class ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr>;
template class ACE_NOOP_Creation_Strategy<TAO_HANDLER>;
template class ACE_Concurrency_Strategy<TAO_HANDLER>;
template class ACE_Connect_Strategy<TAO_HANDLER, ACE_MEM_CONNECTOR>;
template class ACE_Connector<TAO_HANDLER, ACE_MEM_CONNECTOR>;
template class ACE_Creation_Strategy<TAO_HANDLER>;
template class ACE_Hash_Map_Entry<TAO_ADDR, TAO_HANDLER *>;
-template class ACE_Hash<ACE_Refcounted_Hash_Recyclable<ACE_MEM_Addr> >;
-template class ACE_Equal_To<ACE_Refcounted_Hash_Recyclable<ACE_MEM_Addr> >;
+template class ACE_Hash<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> >;
+template class ACE_Equal_To<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> >;
template class ACE_Map_Entry<ACE_HANDLE, TAO_SVC_TUPLE *>;
template class ACE_Map_Manager<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>;
template class ACE_Map_Iterator_Base<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>;
@@ -221,9 +221,9 @@ template class ACE_Refcounted_Recyclable_Handler_Caching_Utility<TAO_ADDR, TAO_C
#pragma instantiate auto_ptr<TAO_SHMIOP_Connect_Creation_Strategy>
#pragma instantiate ACE_Auto_Basic_Ptr<TAO_SHMIOP_Connect_Creation_Strategy>
-#pragma instantiate ACE_Node<ACE_MEM_Addr>
-#pragma instantiate ACE_Unbounded_Stack<ACE_MEM_Addr>
-#pragma instantiate ACE_Unbounded_Stack_Iterator<ACE_MEM_Addr>
+#pragma instantiate ACE_Node<ACE_INET_Addr>
+#pragma instantiate ACE_Unbounded_Stack<ACE_INET_Addr>
+#pragma instantiate ACE_Unbounded_Stack_Iterator<ACE_INET_Addr>
#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT)
#pragma instantiate CACHED_CONNECT_STRATEGY
@@ -231,15 +231,15 @@ template class ACE_Refcounted_Recyclable_Handler_Caching_Utility<TAO_ADDR, TAO_C
#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
#pragma instantiate ACE_Svc_Handler<ACE_MEM_STREAM, ACE_NULL_SYNCH>
-#pragma instantiate ACE_Refcounted_Hash_Recyclable<ACE_MEM_Addr>
+#pragma instantiate ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr>
#pragma instantiate ACE_NOOP_Creation_Strategy<TAO_HANDLER>
#pragma instantiate ACE_Concurrency_Strategy<TAO_HANDLER>
#pragma instantiate ACE_Connect_Strategy<TAO_HANDLER, ACE_MEM_CONNECTOR>
#pragma instantiate ACE_Connector<TAO_HANDLER, ACE_MEM_CONNECTOR>
#pragma instantiate ACE_Creation_Strategy<TAO_HANDLER>
#pragma instantiate ACE_Hash_Map_Entry<TAO_ADDR, TAO_HANDLER *>
-#pragma instantiate ACE_Hash<ACE_Refcounted_Hash_Recyclable<ACE_MEM_Addr> >
-#pragma instantiate ACE_Equal_To<ACE_Refcounted_Hash_Recyclable<ACE_MEM_Addr> >
+#pragma instantiate ACE_Hash<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> >
+#pragma instantiate ACE_Equal_To<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> >
#pragma instantiate ACE_Map_Entry<ACE_HANDLE, TAO_SVC_TUPLE *>
#pragma instantiate ACE_Map_Manager<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>
#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>
@@ -460,21 +460,6 @@ TAO_SHMIOP_Connector::connect (TAO_Profile *profile,
const ACE_INET_Addr &oa =
shmiop_profile->object_addr ();
- if (! this->address_.same_host (oa))
- {
- if (TAO_orbdebug)
- ACE_DEBUG ((LM_ERROR,
- ASYS_TEXT ("(%P|%t) %s:%u, is not local ")
- ASYS_TEXT ("SHMIOP endpoint)\n"),
- __FILE__,
- __LINE__,
- oa.get_host_name (),
- oa.get_port_number ()));
- return -1;
- }
-
- this->address_.set (oa.get_port_number ());
-
ACE_Synch_Options synch_options;
if (max_wait_time != 0)
synch_options.set (ACE_Synch_Options::USE_TIMEOUT,
@@ -488,7 +473,7 @@ TAO_SHMIOP_Connector::connect (TAO_Profile *profile,
// affected.
if (this->base_connector_.connect (shmiop_profile->hint (),
result,
- this->address_,
+ oa,
synch_options) == -1)
{ // Give users a clue to the problem.
if (TAO_orbdebug)
diff --git a/TAO/tao/SHMIOP_Connector.h b/TAO/tao/SHMIOP_Connector.h
index 6650b8da926..2136a874d26 100644
--- a/TAO/tao/SHMIOP_Connector.h
+++ b/TAO/tao/SHMIOP_Connector.h
@@ -128,7 +128,7 @@ public:
typedef ACE_Pair<TAO_SHMIOP_Client_Connection_Handler *,
TAO_ATTRIBUTES>
TAO_CACHED_HANDLER;
- typedef ACE_Refcounted_Hash_Recyclable<ACE_MEM_Addr>
+ typedef ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr>
TAO_IADDR;
typedef ACE_Hash<TAO_IADDR> TAO_HASH_KEY;
typedef ACE_Equal_To<TAO_IADDR> TAO_COMPARE_KEYS;
diff --git a/ace/MEM_Connector.cpp b/ace/MEM_Connector.cpp
index 1dac7a97252..b62be21e137 100644
--- a/ace/MEM_Connector.cpp
+++ b/ace/MEM_Connector.cpp
@@ -29,7 +29,7 @@ ACE_MEM_Connector::ACE_MEM_Connector (void)
// Establish a connection.
ACE_MEM_Connector::ACE_MEM_Connector (ACE_MEM_Stream &new_stream,
- const ACE_MEM_Addr &remote_sap,
+ const ACE_INET_Addr &remote_sap,
ACE_Time_Value *timeout,
const ACE_Addr &local_sap,
int reuse_addr,
@@ -52,7 +52,7 @@ ACE_MEM_Connector::ACE_MEM_Connector (ACE_MEM_Stream &new_stream,
int
ACE_MEM_Connector::connect (ACE_MEM_Stream &new_stream,
- const ACE_MEM_Addr &remote_sap,
+ const ACE_INET_Addr &remote_sap,
ACE_Time_Value *timeout,
const ACE_Addr &local_sap,
int reuse_addr,
@@ -62,9 +62,16 @@ ACE_MEM_Connector::connect (ACE_MEM_Stream &new_stream,
{
ACE_TRACE ("ACE_MEM_Connector::connect");
+ if (!this->address_.same_host (remote_sap))
+ return -1;
+ else
+ this->address_.set_port_number (remote_sap.get_port_number ());
+
+
ACE_SOCK_Stream temp_stream;
- if (ACE_SOCK_Connector::connect (temp_stream, remote_sap.get_local_addr (),
+ if (ACE_SOCK_Connector::connect (temp_stream,
+ this->address_.get_local_addr (),
timeout, local_sap,
reuse_addr, flags, perms,
PF_INET, protocol) == -1)
diff --git a/ace/MEM_Connector.h b/ace/MEM_Connector.h
index fc57002db26..ec4a3edd439 100644
--- a/ace/MEM_Connector.h
+++ b/ace/MEM_Connector.h
@@ -36,7 +36,7 @@ public:
// Default constructor.
ACE_MEM_Connector (ACE_MEM_Stream &new_stream,
- const ACE_MEM_Addr &remote_sap,
+ const ACE_INET_Addr &remote_sap,
ACE_Time_Value *timeout = 0,
const ACE_Addr &local_sap = ACE_Addr::sap_any,
int reuse_addr = 0,
@@ -58,7 +58,7 @@ public:
// <local_addr> is reused, even if it hasn't been cleanedup yet.
int connect (ACE_MEM_Stream &new_stream,
- const ACE_MEM_Addr &remote_sap,
+ const ACE_INET_Addr &remote_sap,
ACE_Time_Value *timeout = 0,
const ACE_Addr &local_sap = ACE_Addr::sap_any,
int reuse_addr = 0,
@@ -83,7 +83,7 @@ public:
// Accessor to underlying malloc options.
// = Meta-type info
- typedef ACE_MEM_Addr PEER_ADDR;
+ typedef ACE_INET_Addr PEER_ADDR;
typedef ACE_MEM_Stream PEER_STREAM;
void dump (void) const;
@@ -93,6 +93,8 @@ public:
// Declare the dynamic allocation hooks.
private:
+ ACE_MEM_Addr address_;
+
ACE_MEM_SAP::MALLOC_OPTIONS malloc_options_;
};
diff --git a/ace/OS.h b/ace/OS.h
index 4b4088e6bb9..7b26fde018b 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -1715,8 +1715,8 @@ private: ACE_Time_Value *max_wait_time_;
// Handle ACE_MEM_*
# define ACE_MEM_ACCEPTOR ACE_MEM_Acceptor, ACE_MEM_Addr
-# define ACE_MEM_CONNECTOR ACE_MEM_Connector, ACE_MEM_Addr
-# define ACE_MEM_STREAM ACE_MEM_Stream, ACE_Addr
+# define ACE_MEM_CONNECTOR ACE_MEM_Connector, ACE_INET_Addr
+# define ACE_MEM_STREAM ACE_MEM_Stream, ACE_INET_Addr
// Handle ACE_LSOCK_*
# define ACE_LSOCK_ACCEPTOR ACE_LSOCK_Acceptor, ACE_UNIX_Addr
diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-memclient.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-memclient.cpp
index e96c72abab6..37182fd2c38 100644
--- a/examples/IPC_SAP/SOCK_SAP/CPP-memclient.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/CPP-memclient.cpp
@@ -21,8 +21,9 @@ run_client (void)
{
ACE_MEM_Connector connector;
ACE_MEM_Stream stream;
+ ACE_INET_Addr server_addr (ACE_DEFAULT_SERVER_PORT, "COYOTE");
- if (connector.connect (stream, ACE_DEFAULT_SERVER_PORT) == -1)
+ if (connector.connect (stream, server_addr) == -1)
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "connect"), -1);
char buf [MAXPATHLEN];
diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-memserver.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-memserver.cpp
index 107b58fd762..0dcf1c29cbc 100644
--- a/examples/IPC_SAP/SOCK_SAP/CPP-memserver.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/CPP-memserver.cpp
@@ -18,10 +18,10 @@ run_event_loop (u_short port)
// Create the acceptors.
ACE_MEM_Acceptor acceptor;
- ACE_INET_Addr server_addr;
+ ACE_MEM_Addr server_addr (port);
// Create acceptors, reuse the address.
- if (acceptor.open (port, 1) == -1)
+ if (acceptor.open (server_addr, 1) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"%p\n",
"open"),