diff options
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 8 | ||||
-rw-r--r-- | TAO/tests/ORT/ORT_test_IORInterceptor.cpp | 3 | ||||
-rw-r--r-- | TAO/tests/ORT/client.cpp | 3 | ||||
-rw-r--r-- | TAO/tests/ORT/server.cpp | 38 |
4 files changed, 36 insertions, 16 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index e452474cd49..c7f4a0db183 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,11 @@ +Sun Jan 27 00:52:49 2002 Ossama Othman <ossama@uci.edu> + + * tests/ORT/ORT_test_IORInterceptor.cpp: + * tests/ORT/client.cpp: + * tests/ORT/server.cpp: + + Minor code review. Nothing major. Just style issues. + Sat Jan 26 23:09:56 2002 Ossama Othman <ossama@uci.edu> * tao/ORB.h: diff --git a/TAO/tests/ORT/ORT_test_IORInterceptor.cpp b/TAO/tests/ORT/ORT_test_IORInterceptor.cpp index b75e50cff5c..9efa44bb399 100644 --- a/TAO/tests/ORT/ORT_test_IORInterceptor.cpp +++ b/TAO/tests/ORT/ORT_test_IORInterceptor.cpp @@ -60,6 +60,8 @@ ORT_test_IORInterceptor::adapter_manager_state_changed ( { ACE_DEBUG ((LM_DEBUG, "The adapter_manager state has changed. \n")); + + // @@ Priyanka, why do you need the below "return" statement? return; } @@ -69,5 +71,6 @@ ORT_test_IORInterceptor:: adapter_state_changed ( PortableInterceptor::AdapterState) ACE_THROW_SPEC ((CORBA::SystemException)) { + // @@ Priyanka, why do you need the below "return" statement? return; } diff --git a/TAO/tests/ORT/client.cpp b/TAO/tests/ORT/client.cpp index 7c560687aeb..6dbb98ce4d1 100644 --- a/TAO/tests/ORT/client.cpp +++ b/TAO/tests/ORT/client.cpp @@ -63,6 +63,9 @@ main (int argc, char *argv[]) 1); } + // @@ Priyanka, can't you just do the following: + // CORBA::Boolean result = server->request... + // No need initialize twice. CORBA::Boolean result = 1; result = server->request_server (TAO_ENV_SINGLE_ARG_DECL); diff --git a/TAO/tests/ORT/server.cpp b/TAO/tests/ORT/server.cpp index d243d53af9e..a949f34dc79 100644 --- a/TAO/tests/ORT/server.cpp +++ b/TAO/tests/ORT/server.cpp @@ -58,7 +58,7 @@ int main (int argc, char *argv[]) #endif /* TAO_HAS_INTERCEPTORS == 1 */ - /// Initialize the ORB. + // Initialize the ORB. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" @@ -73,31 +73,37 @@ int main (int argc, char *argv[]) TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - /// Narrow + // Narrow PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - /// Check for nil references + // Check for nil references if (CORBA::is_nil (root_poa.in ())) ACE_ERROR_RETURN ((LM_ERROR, "Unable to obtain RootPOA reference.\n"), -1); - /// Get poa_manager reference + // Get poa_manager reference PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - /// Activate it. + // Activate it. poa_manager->activate (TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - ///@} + //@} - /// First lets check if the new -ORBId, -ORBServerId options are - /// working correctly. + // First lets check if the new -ORBId, -ORBServerId options are + // working correctly. + // @@ Priyanka, use "orb->id (TAO_ENV_SINGLE_ARG_PARAMETER)" + // here. It is standard and portable. Don't forget the + // ACE_TRY_CHECK. + // @@ On second thought. The ORB_init test already tests the + // -ORBid, and has been doing so for a very long time. Is + // the below code necessary? CORBA::String_var orb_id = orb->orb_core ()->orbid (); if (ACE_OS::strcmp (orb_id.in (), "ORT_test_ORB") != 0) @@ -119,7 +125,7 @@ int main (int argc, char *argv[]) CORBA::PolicyList policies (0); policies.length (0); - /// Lets create some POA's + // Lets create some POA's PortableServer::POA_var first_poa = root_poa->create_POA ("FIRST_POA", poa_manager.in (), @@ -136,8 +142,8 @@ int main (int argc, char *argv[]) PortableServer::POA_var third_poa = first_poa->create_POA ("THIRD_POA", - poa_manager.in (), - policies + poa_manager.in (), + policies TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -150,17 +156,17 @@ int main (int argc, char *argv[]) ORT_test_i ort_test_impl; - /// Activate + // Activate obj = ort_test_impl._this (TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - /// Narrow it down. + // Narrow it down. ObjectReferenceTemplate::ORT_test_var ort_test = ObjectReferenceTemplate::ORT_test::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - /// Check for nil reference + // Check for nil reference if (CORBA::is_nil (ort_test.in ())) ACE_ERROR_RETURN ((LM_ERROR, "Unable to obtain reference to ", @@ -168,12 +174,12 @@ int main (int argc, char *argv[]) "object.\n"), -1); - /// Convert the object reference to a string format. + // Convert the object reference to a string format. CORBA::String_var ior = orb->object_to_string (ort_test.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - /// If the ior_output_file exists, output the IOR to it. + // If the ior_output_file exists, output the IOR to it. if (ior_output_file != 0) { FILE *output_file = ACE_OS::fopen (ior_output_file, "w"); |