diff options
author | Phil Mesnier <mesnier_p@ociweb.com> | 2007-08-14 21:54:46 +0000 |
---|---|---|
committer | Phil Mesnier <mesnier_p@ociweb.com> | 2007-08-14 21:54:46 +0000 |
commit | 60f6e9fac0e8bd32650797da31cf3f4863bd23ec (patch) | |
tree | e4cf5f3300e1fd2f3a32fe824e09b2eb6e4c301c | |
parent | 3c924c23fd65f5934b8ce2240aca679cb45dbbf4 (diff) | |
download | ATCD-60f6e9fac0e8bd32650797da31cf3f4863bd23ec.tar.gz |
Tue Aug 14 21:50:40 UTC 2007 Phil Mesnier <mesnier_p@ociweb.com>
-rw-r--r-- | TAO/ChangeLog | 33 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Acceptor.cpp | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Connection_Handler.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Endpoint.cpp | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Factory.cpp | 22 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp | 3 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/HTIOP/AMI/client.cpp | 3 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/HTIOP/AMI/server.cpp | 4 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/HTIOP/HT_Config.conf | 11 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/HTIOP/Hello/client.cpp | 5 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/HTIOP/Hello/server.cpp | 8 |
11 files changed, 68 insertions, 35 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 33ea3831e63..ed7340d955c 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,34 @@ +Tue Aug 14 21:50:40 UTC 2007 Phil Mesnier <mesnier_p@ociweb.com> + + * orbsvcs/orbsvcs/HTIOP/HTIOP_Acceptor.cpp: + * orbsvcs/orbsvcs/HTIOP/HTIOP_Connection_Handler.cpp: + * orbsvcs/orbsvcs/HTIOP/HTIOP_Endpoint.cpp: + * orbsvcs/orbsvcs/HTIOP/HTIOP_Factory.cpp: + * orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp: + + Make sure HTIOP builds and runs properly in an IPv6 enabled + environment. + + * orbsvcs/tests/HTIOP/AMI/client.cpp: + * orbsvcs/tests/HTIOP/AMI/server.cpp: + + * orbsvcs/tests/HTIOP/HT_Config.conf: + + * orbsvcs/tests/HTIOP/Hello/client.cpp: + * orbsvcs/tests/HTIOP/Hello/server.cpp: + + Fix up the tests to run cleanly in a nightly build environment + This is primarily fixing the configuration so that it does not + depend on an external proxy, but will use one if locally + configured to do so. Also fixed up the test output and command + line processing to make it more consistent with other tests. + + I've not turned on the automatic running of these tests just + yet, I'd rather wait and just make sure the build is clean. We + can turn on the automatic run at some point later now that the + tests are cleaned up. + + Tue Aug 14 17:47:30 UTC 2007 Abdullah Sowayan <abdullah.sowayan@lmco.com> * tao/AnyTypeCode/append.cpp: @@ -24,7 +55,7 @@ Tue Aug 14 17:47:30 UTC 2007 Abdullah Sowayan <abdullah.sowayan@lmco.com> * tao/RTScheduling/RTScheduler_Loader.cpp: * tao/Stub.inl: * tao/TAO_Singleton_Manager.inl: - + Untabify. Tue Aug 14 16:19:35 UTC 2007 Phil Mesnier <mesnier_p@ociweb.com> diff --git a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Acceptor.cpp b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Acceptor.cpp index 446b62f7522..bceed5817a1 100644 --- a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Acceptor.cpp +++ b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Acceptor.cpp @@ -599,11 +599,13 @@ TAO::HTIOP::Acceptor::dotted_decimal_address (ACE_INET_Addr &addr, // INET_Addr with the hostname from the original one. If that fails // then something is seriously wrong with the systems networking // setup. - if (addr.get_ip_address () == INADDR_ANY) + if (addr.is_any()) { ACE::HTBP::Addr new_addr; result = new_addr.ACE_INET_Addr::set (addr.get_port_number (), - addr.get_host_name ()); + addr.get_host_name (), + 1, + addr.get_type()); tmp = new_addr.get_host_addr (); } else diff --git a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Connection_Handler.cpp b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Connection_Handler.cpp index 0e8ea8f8e35..3f90f802ff8 100644 --- a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Connection_Handler.cpp +++ b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Connection_Handler.cpp @@ -95,7 +95,7 @@ TAO::HTIOP::Connection_Handler::open (void*) if (this->peer ().get_local_addr (local_addr) == -1) return -1; - if (local_addr.get_ip_address () == remote_addr.get_ip_address () + if (local_addr.is_ip_equal (remote_addr) && local_addr.get_port_number () == remote_addr.get_port_number ()) { diff --git a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Endpoint.cpp b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Endpoint.cpp index c788395bf1d..0f509ab566f 100644 --- a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Endpoint.cpp +++ b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Endpoint.cpp @@ -213,13 +213,9 @@ TAO::HTIOP::Endpoint::is_equivalent (const TAO_Endpoint *other_endpoint) CORBA::ULong TAO::HTIOP::Endpoint::hash (void) { - // We could call ACE::HTBP::Addr::hash() since it does much the same - // thing except that it converts the port from network byte order to - // host byte order. As such, this implementation is actually less - // costly. if (this->htid_.in() && ACE_OS::strlen (this->htid_.in())) return ACE::hash_pjw(this->htid_.in()); - return this->object_addr ().get_ip_address () + this->port (); + return this->object_addr ().hash(); } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Factory.cpp b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Factory.cpp index 820c5c7ad01..34ba5a8f8a1 100644 --- a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Factory.cpp @@ -53,6 +53,8 @@ TAO::HTIOP::Protocol_Factory::init (int argc, { const ACE_TCHAR * config_file = 0; const ACE_TCHAR * persist_file = 0; + unsigned proxy_port = 0; + const ACE_TCHAR * proxy_host = 0; ACE_stat statbuf; int use_registry = 0; @@ -80,6 +82,18 @@ TAO::HTIOP::Protocol_Factory::init (int argc, if (++i < argc) this->inside_ = ACE_OS::atoi (ACE_TEXT_ALWAYS_CHAR(argv[i])); } + else if (ACE_OS::strcasecmp(argv[i], ACE_TEXT("-proxy_port")) == 0) + { + if (++i < argc) + proxy_port = static_cast<unsigned> + (ACE_OS::atoi (ACE_TEXT_ALWAYS_CHAR(argv[i]))); + } + else if (ACE_OS::strcasecmp(argv[i], ACE_TEXT("-proxy_host")) == 0) + { + if (++i < argc) + if (ACE_OS::stat (argv[i],&statbuf) != -1) + proxy_host = argv[i]; + } } ACE_NEW_RETURN (this->ht_env_, @@ -90,7 +104,13 @@ TAO::HTIOP::Protocol_Factory::init (int argc, if (config_file != 0) this->ht_env_->import_config (config_file); - + else + { + if (proxy_port != 0) + this->ht_env_->set_proxy_port (proxy_port); + if (proxy_host != 0) + this->ht_env_->set_proxy_host (proxy_host); + } return 0; } diff --git a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp index 37a6041402b..de8e4816a41 100644 --- a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp +++ b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp @@ -402,8 +402,7 @@ TAO::HTIOP::Transport::get_listen_point (::HTIOP::ListenPointList &lp_list, index != count; index++) { - if (local_addr.get_ip_address() - == endpoint_addr[index].get_ip_address()) + if (local_addr.is_ip_equal (endpoint_addr[index])) { // Get the count of the number of elements CORBA::ULong len = lp_list.length (); diff --git a/TAO/orbsvcs/tests/HTIOP/AMI/client.cpp b/TAO/orbsvcs/tests/HTIOP/AMI/client.cpp index 9637a29cfb9..14fc07be35f 100644 --- a/TAO/orbsvcs/tests/HTIOP/AMI/client.cpp +++ b/TAO/orbsvcs/tests/HTIOP/AMI/client.cpp @@ -17,7 +17,6 @@ // // ============================================================================ -#include "tests/test_config.h" #include "ace/OS_NS_sys_socket.h" #include "ace/Get_Opt.h" #include "ace/Task.h" @@ -162,7 +161,6 @@ Handler handler; int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ACE_TEXT ("HTIOP_AMI_client")); try { CORBA::ORB_var orb = @@ -264,7 +262,6 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) return 1; } - ACE_END_TEST; return 0; } diff --git a/TAO/orbsvcs/tests/HTIOP/AMI/server.cpp b/TAO/orbsvcs/tests/HTIOP/AMI/server.cpp index 77a673f9b6b..51820b26174 100644 --- a/TAO/orbsvcs/tests/HTIOP/AMI/server.cpp +++ b/TAO/orbsvcs/tests/HTIOP/AMI/server.cpp @@ -19,8 +19,6 @@ #include "ami_test_i.h" -#include "tests/test_config.h" - #include "tao/debug.h" #include "ace/Get_Opt.h" #include "ace/OS_NS_sys_socket.h" @@ -60,7 +58,6 @@ parse_args (int argc, char *argv[]) int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ACE_TEXT ("HTIOP_AMI_server")); try { CORBA::ORB_var orb = @@ -126,6 +123,5 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) return 1; } - ACE_END_TEST; return 0; } diff --git a/TAO/orbsvcs/tests/HTIOP/HT_Config.conf b/TAO/orbsvcs/tests/HTIOP/HT_Config.conf index 49dfd238ec3..353b30b2af8 100644 --- a/TAO/orbsvcs/tests/HTIOP/HT_Config.conf +++ b/TAO/orbsvcs/tests/HTIOP/HT_Config.conf @@ -1,4 +1,9 @@ [htbp] -proxy_port=3128 -proxy_host=rtai.ociweb.com -htid_url=http://rtai.ociweb.com/cgi-bin/HTIOP_ID_Generator.cgi +# The Proxy_port and proxy_host values control how the HTIOP "inside" peers +# to connect to "outside" peers. In situations where the process inside a +# protected enclave is required to vector all HTTP traffic through some +# third-party proxy, such as Squid, then put the host and port for that +# proxy here. + +#proxy_port=3128 +#proxy_host=rtai.ociweb.com diff --git a/TAO/orbsvcs/tests/HTIOP/Hello/client.cpp b/TAO/orbsvcs/tests/HTIOP/Hello/client.cpp index e166b4cec3d..3ea6e486806 100644 --- a/TAO/orbsvcs/tests/HTIOP/Hello/client.cpp +++ b/TAO/orbsvcs/tests/HTIOP/Hello/client.cpp @@ -1,8 +1,6 @@ // $Id$ #include "TestC.h" - -#include "tests/test_config.h" #include <ace/Get_Opt.h> @@ -39,8 +37,6 @@ parse_args (int argc, char *argv[]) int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ACE_TEXT ("Hello_client")); - try { @@ -81,6 +77,5 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) return 1; } - ACE_END_TEST; return 0; } diff --git a/TAO/orbsvcs/tests/HTIOP/Hello/server.cpp b/TAO/orbsvcs/tests/HTIOP/Hello/server.cpp index 3434cf37f3d..0f2901479e2 100644 --- a/TAO/orbsvcs/tests/HTIOP/Hello/server.cpp +++ b/TAO/orbsvcs/tests/HTIOP/Hello/server.cpp @@ -2,8 +2,6 @@ #include "Hello.h" -#include "tests/test_config.h" - #include "ace/Get_Opt.h" #include "tao/IORTable/IORTable.h" #include "orbsvcs/CosNamingC.h" @@ -43,8 +41,6 @@ parse_args (int argc, char *argv[]) int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ACE_TEXT ("Hello_server")); - try { ACE_DEBUG ((LM_DEBUG, "Begin of Hello_Server test\n")); @@ -140,16 +136,12 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) orb->destroy (); ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - orb destroyed\n")); - - ACE_DEBUG ((LM_DEBUG, "server exiting\n")); } catch (const CORBA::Exception& ex) { - ACE_END_TEST; ex._tao_print_exception ("Exception caught:"); return 1; } - ACE_END_TEST; return 0; } |