summaryrefslogtreecommitdiff
path: root/ACE/tests/Test_Output.cpp
diff options
context:
space:
mode:
authorelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-04-11 18:21:14 +0000
committerelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-04-11 18:21:14 +0000
commit1dffece376930b1a2ecf88a5de6247f5ddb2d61f (patch)
treef3c27ca16cccea62e0076704c3a3763d3f2e37d5 /ACE/tests/Test_Output.cpp
parent9e9cd3ea30de94a87119624011567380320dda6f (diff)
downloadATCD-1dffece376930b1a2ecf88a5de6247f5ddb2d61f.tar.gz
ChangeLogTag: Wed Apr 11 18:16:29 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'ACE/tests/Test_Output.cpp')
-rw-r--r--ACE/tests/Test_Output.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/ACE/tests/Test_Output.cpp b/ACE/tests/Test_Output.cpp
index 7e54fc35294..b29a8100a4a 100644
--- a/ACE/tests/Test_Output.cpp
+++ b/ACE/tests/Test_Output.cpp
@@ -58,17 +58,14 @@ ACE_Test_Output::~ACE_Test_Output (void)
#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) && \
(!defined (ACE_HAS_PHARLAP) || defined (ACE_PHARLAP_TESTLOG_TO_FILE))
- if (this->output_file_ == log_msg_stream)
- delete this->output_file_;
- // else something else changed the stream and hence should
- // have closed and deleted the output_file_
+ delete this->output_file_;
#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
}
OFSTREAM *
ACE_Test_Output::output_file (void)
{
- // the output_file_ is given to ACE_LOG_MSG
+ // the output_file_ is loaned to ACE_LOG_MSG
// and something else might destroy and/or change the stream
// so return what ACE_LOG_MSG is using.
#if defined (ACE_LACKS_IOSTREAM_TOTALLY)
@@ -159,7 +156,7 @@ ACE_Test_Output::set_output (const ACE_TCHAR *filename, int append)
this->output_file_ = ACE_OS::fopen (temp, fmode);
# endif /* ACE_LACKS_IOSTREAM_TOTALLY */
- ACE_LOG_MSG->msg_ostream (this->output_file_);
+ ACE_LOG_MSG->msg_ostream (this->output_file_, 0);
#endif /* ACE_HAS_PHARLAP && !ACE_PHARLAP_TESTLOG_TO_FILE */
ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR | ACE_Log_Msg::LOGGER );
@@ -180,12 +177,11 @@ ACE_Test_Output::close (void)
#else
ACE_OS::fflush (this->output_file_);
ACE_OS::fclose (this->output_file_);
- this->output_file_ = 0;
#endif /* !ACE_LACKS_IOSTREAM_TOTALLY */
ACE_LOG_MSG->msg_ostream (0, 0);
}
// else something else changed the stream and hence should
- // have closed and deleted the output_file_
+ // have closed the output_file_
}
ACE_Test_Output*