summaryrefslogtreecommitdiff
path: root/TAO/tests/AMI/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/AMI/server.cpp')
-rw-r--r--TAO/tests/AMI/server.cpp36
1 files changed, 15 insertions, 21 deletions
diff --git a/TAO/tests/AMI/server.cpp b/TAO/tests/AMI/server.cpp
index 9a2dfa93eb3..37f3ccf7595 100644
--- a/TAO/tests/AMI/server.cpp
+++ b/TAO/tests/AMI/server.cpp
@@ -17,13 +17,13 @@ parse_args (int argc, char *argv[])
switch (c)
{
case 'o':
- ior_output_file = get_opts.optarg;
- break;
+ ior_output_file = get_opts.optarg;
+ break;
case '?':
default:
ACE_ERROR_RETURN ((LM_ERROR,
"usage: %s "
- "-o <iorfile>"
+ "-o <iorfile>"
"\n",
argv [0]),
-1);
@@ -66,36 +66,30 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
CORBA::String_var ior =
- orb->object_to_string (server.in (), ACE_TRY_ENV);
+ orb->object_to_string (server.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
// 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");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
+ {
+ FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s",
+ ior_output_file),
+ 1);
+ ACE_OS::fprintf (output_file, "%s", ior.in ());
+ ACE_OS::fclose (output_file);
+ }
poa_manager->activate (ACE_TRY_ENV);
ACE_TRY_CHECK;
- CORBA::Long number = 0;
-
- number = server->get_number (ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG, "get_number = %d\n", number));
-
if (orb->run () == -1)
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1);
+
ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
}
ACE_CATCHANY