diff options
author | marina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-08-26 18:05:29 +0000 |
---|---|---|
committer | marina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-08-26 18:05:29 +0000 |
commit | 95df88639321e617de9e376b19a018ff7eff5ed7 (patch) | |
tree | a3af7532bdc59c43078e1999de79137cfd7f189b /TAO/tests/RTCORBA | |
parent | 4ea56f7e77ff05142a61d87469d9247433fd2714 (diff) | |
download | ATCD-95df88639321e617de9e376b19a018ff7eff5ed7.tar.gz |
ChangeLogTag:Sat Aug 26 13:01:31 2000 Marina Spivak <marina@cs.wustl.edu>
Diffstat (limited to 'TAO/tests/RTCORBA')
5 files changed, 39 insertions, 17 deletions
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server.cpp b/TAO/tests/RTCORBA/Server_Protocol/server.cpp index 964e9551ca2..1af2aef0663 100644 --- a/TAO/tests/RTCORBA/Server_Protocol/server.cpp +++ b/TAO/tests/RTCORBA/Server_Protocol/server.cpp @@ -30,7 +30,7 @@ void Test_i::shutdown (CORBA::Environment& ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_DEBUG ((LM_DEBUG, + ACE_DEBUG ((LM_DEBUG, "Received request to shut down the ORB\n")); this->orb_->shutdown (0, ACE_TRY_ENV); } @@ -46,7 +46,7 @@ int parse_args (int argc, char *argv[]) { ACE_Get_Opt get_opts (argc, argv, "o:p:"); - int c; + int c, result; while ((c = get_opts ()) != -1) switch (c) @@ -56,7 +56,14 @@ parse_args (int argc, char *argv[]) break; case 'p': - protocol_type = ACE_OS::atoi (get_opts.optarg); + result = ::sscanf (get_opts.optarg, + "%u", + &protocol_type); + if (result == 0 || result == EOF) + ACE_ERROR_RETURN ((LM_ERROR, + "Unable to process <-p> option"), + -1); + protocol_chosen = 1; break; @@ -74,7 +81,7 @@ parse_args (int argc, char *argv[]) } int -check_default_server_protocol (CORBA::ORB_ptr orb, +check_default_server_protocol (CORBA::ORB_ptr orb, CORBA::Environment &ACE_TRY_ENV) { // Users should never write code like below. @@ -93,15 +100,16 @@ check_default_server_protocol (CORBA::ORB_ptr orb, RTCORBA::ProtocolList_var protocols = policy->protocols (ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - ACE_DEBUG ((LM_DEBUG, - "ORB default for ServerProtocolPolicy" - "contains %d protocls\n", protocols->length ())); + ACE_DEBUG ((LM_DEBUG, + "\nORB default for ServerProtocolPolicy " + "contains %u protocols:\n", protocols->length ())); for (CORBA::ULong i = 0; i < protocols->length (); ++i) { CORBA::ULong protocol_type = protocols[i].protocol_type; - ACE_DEBUG ((LM_DEBUG, - "Protocol %d type IOP::ProfileId: %d\n")); + ACE_DEBUG ((LM_DEBUG, + " Protocol %u: IOP::ProfileId = %u\n", + i, protocol_type)); RTCORBA::ProtocolProperties_var properties = protocols[i].transport_protocol_properties; @@ -116,8 +124,10 @@ check_default_server_protocol (CORBA::ORB_ptr orb, if (!CORBA::is_nil (tcp_properties.in ())) ACE_DEBUG ((LM_DEBUG, - " Properties: send_buffer_size = %d" - " receive_buffer_size = %d no_delay = %d\n", + " Properties: \n" + " send_buffer_size = %d\n" + " receive_buffer_size = %d\n" + " no_delay = %d\n", tcp_properties->send_buffer_size (), tcp_properties->recv_buffer_size (), tcp_properties->no_delay ())); @@ -132,8 +142,9 @@ check_default_server_protocol (CORBA::ORB_ptr orb, if (!CORBA::is_nil (uiop_properties.in ())) ACE_DEBUG ((LM_DEBUG, - " Properties: send_buffer_size = %d" - " receive_buffer_size = %d\n", + " Properties: \n" + " send_buffer_size = %d\n" + " receive_buffer_size = %d\n", uiop_properties->send_buffer_size (), uiop_properties->recv_buffer_size ())); } @@ -187,7 +198,7 @@ main (int argc, char *argv[]) RTCORBA::ProtocolList protocols; protocols.length (1); protocols[0].protocol_type = protocol_type; - protocols[0].transport_protocol_properties = + protocols[0].transport_protocol_properties = RTCORBA::ProtocolProperties::_nil (); protocols[0].orb_protocol_properties = RTCORBA::ProtocolProperties::_nil (); @@ -233,7 +244,7 @@ main (int argc, char *argv[]) orb->object_to_string (server.in (), ACE_TRY_ENV); ACE_TRY_CHECK; - ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ())); + ACE_DEBUG ((LM_DEBUG, "\nActivated as <%s>\n\n", ior.in ())); if (ior_output_file != 0) { @@ -254,7 +265,7 @@ main (int argc, char *argv[]) orb->run (ACE_TRY_ENV); ACE_TRY_CHECK; - ACE_DEBUG ((LM_DEBUG, "Server ORB event loop finished\n")); + ACE_DEBUG ((LM_DEBUG, "Server ORB event loop finished\n\n")); } ACE_CATCHANY { @@ -266,4 +277,3 @@ main (int argc, char *argv[]) return 0; } - diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_iiop.conf b/TAO/tests/RTCORBA/Server_Protocol/server_iiop.conf new file mode 100644 index 00000000000..44998cac285 --- /dev/null +++ b/TAO/tests/RTCORBA/Server_Protocol/server_iiop.conf @@ -0,0 +1,2 @@ +dynamic IIOP_Factory Service_Object * TAO:_make_TAO_IIOP_Protocol_Factory() "" +static Resource_Factory "-ORBProtocolFactory IIOP_Factory"
\ No newline at end of file diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_reverse.conf b/TAO/tests/RTCORBA/Server_Protocol/server_reverse.conf new file mode 100644 index 00000000000..52f69bc8bf7 --- /dev/null +++ b/TAO/tests/RTCORBA/Server_Protocol/server_reverse.conf @@ -0,0 +1,6 @@ +dynamic SHMIOP_Factory Service_Object * TAO:_make_TAO_SHMIOP_Protocol_Factory() +static Resource_Factory "-ORBProtocolFactory SHMIOP_Factory" +dynamic UIOP_Factory Service_Object * TAO:_make_TAO_UIOP_Protocol_Factory() "" +static Resource_Factory "-ORBProtocolFactory UIOP_Factory" +dynamic IIOP_Factory Service_Object * TAO:_make_TAO_IIOP_Protocol_Factory() "" +static Resource_Factory "-ORBProtocolFactory IIOP_Factory"
\ No newline at end of file diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_shmiop.conf b/TAO/tests/RTCORBA/Server_Protocol/server_shmiop.conf new file mode 100644 index 00000000000..170a5187dc2 --- /dev/null +++ b/TAO/tests/RTCORBA/Server_Protocol/server_shmiop.conf @@ -0,0 +1,2 @@ +dynamic SHMIOP_Factory Service_Object * TAO:_make_TAO_SHMIOP_Protocol_Factory() +static Resource_Factory "-ORBProtocolFactory SHMIOP_Factory" diff --git a/TAO/tests/RTCORBA/Server_Protocol/server_uiop.conf b/TAO/tests/RTCORBA/Server_Protocol/server_uiop.conf new file mode 100644 index 00000000000..32b33da0abb --- /dev/null +++ b/TAO/tests/RTCORBA/Server_Protocol/server_uiop.conf @@ -0,0 +1,2 @@ +dynamic UIOP_Factory Service_Object * TAO:_make_TAO_UIOP_Protocol_Factory() "" +static Resource_Factory "-ORBProtocolFactory UIOP_Factory"
\ No newline at end of file |