diff options
author | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-12-21 13:11:52 +0000 |
---|---|---|
committer | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-12-21 13:11:52 +0000 |
commit | 5003279a83d9698cf71cafd777cc0999e89e3516 (patch) | |
tree | 43e0779a9ef5541886503d30bb601ff0438e67cf /TAO/DevGuideExamples | |
parent | 3f0474ca5ef0b19111b7c766182a9c557cfdd675 (diff) | |
download | ATCD-5003279a83d9698cf71cafd777cc0999e89e3516.tar.gz |
Mon Dec 21 13:09:35 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* DevGuideExamples/Multithreading/ThreadPerConnection/MessengerServer.cpp:
* tests/Oneway_Send_Timeouts/run_test.pl:
* tests/Optimized_Connection/run_test.pl:
* examples/Simple/time-date/svc.conf:
* examples/Simple/time-date/run_test.pl:
Tests are converted to use new test framework
and added to fuzz build.
Diffstat (limited to 'TAO/DevGuideExamples')
-rw-r--r-- | TAO/DevGuideExamples/Multithreading/ThreadPerConnection/MessengerServer.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/TAO/DevGuideExamples/Multithreading/ThreadPerConnection/MessengerServer.cpp b/TAO/DevGuideExamples/Multithreading/ThreadPerConnection/MessengerServer.cpp index 512254aabea..7ae5fe8bb1a 100644 --- a/TAO/DevGuideExamples/Multithreading/ThreadPerConnection/MessengerServer.cpp +++ b/TAO/DevGuideExamples/Multithreading/ThreadPerConnection/MessengerServer.cpp @@ -59,9 +59,16 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) poa->activate_object( messenger_servant.in() ); CORBA::Object_var messenger_obj = poa->id_to_reference( oid.in() ); CORBA::String_var str = orb->object_to_string( messenger_obj.in() ); - std::ofstream iorFile(ACE_TEXT_ALWAYS_CHAR (ior_output_file)); - iorFile << str.in() << std::endl; - iorFile.close(); + + // Output the IOR to the <ior_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\n", + ior_output_file), + 1); + ACE_OS::fprintf (output_file, "%s", str.in ()); + ACE_OS::fclose (output_file); std::cout << "IOR written to file " << ACE_TEXT_ALWAYS_CHAR (ior_output_file) << std::endl; // Accept requests from clients. |