diff options
author | kobica <kobica@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-01-22 19:17:03 +0000 |
---|---|---|
committer | kobica <kobica@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-01-22 19:17:03 +0000 |
commit | 5de5a0d50fdeaff1677e23492d57cc2447b18eee (patch) | |
tree | 970352e06f404c55ccfad7cfe5638115298096ab | |
parent | d32c17f949763ea73effc5575d48cc2285e9b83e (diff) | |
download | ATCD-5de5a0d50fdeaff1677e23492d57cc2447b18eee.tar.gz |
ChangeLogTag: Sat Jan 22 21:13:11 2005 Kobi Cohen-Arazi <kobi.cohenarazi@gmail.com>
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | tests/Test_Output.cpp | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog index 11b89fbe036..d79074d2433 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Jan 22 21:13:11 2005 Kobi Cohen-Arazi <kobi.cohenarazi@gmail.com> + + * tests/Test_Output.cpp(close): Fixed when ACE_LACKS_IOSTREAM_TOTALLY - fflush and fclose + should be called only when output_file_ is valid, and it points to the same current + ACE_LOG_MSG->msg_ostream (). + Fri Jan 21 19:07:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl> * ACE-INSTALL.html: diff --git a/tests/Test_Output.cpp b/tests/Test_Output.cpp index 8ea90c7f5ce..bc24acf9eca 100644 --- a/tests/Test_Output.cpp +++ b/tests/Test_Output.cpp @@ -170,22 +170,22 @@ ACE_Test_Output::set_output (const ACE_TCHAR *filename, int append) void ACE_Test_Output::close (void) { -#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) if (this->output_file_ && (this->output_file_ == ACE_LOG_MSG->msg_ostream ())) { +#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) this->output_file_->flush (); this->output_file_->close (); delete this->output_file_; +#else + ACE_OS::fflush (this->output_file_); + ACE_OS::fclose (this->output_file_); +#endif /* !ACE_LACKS_IOSTREAM_TOTALLY */ this->output_file_=0; ACE_LOG_MSG->msg_ostream (this->output_file_, 0); } // else something else changed the stream and hence should // have closed and deleted the output_file_ -#else - ACE_OS::fflush (this->output_file_); - ACE_OS::fclose (this->output_file_); -#endif /* !ACE_LACKS_IOSTREAM_TOTALLY */ } ACE_Test_Output* |