diff options
author | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-03 16:09:17 +0000 |
---|---|---|
committer | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-03 16:09:17 +0000 |
commit | 539dc04fea1cfd5325b47d600d2f214054f449ee (patch) | |
tree | a9915eee97088b34f7544128d72d5386a3225fc3 /ace/WIN32_Asynch_IO.cpp | |
parent | 0f4c7c1e13c5a4dfaa60b09ecf7969f2e053b185 (diff) | |
download | ATCD-539dc04fea1cfd5325b47d600d2f214054f449ee.tar.gz |
Addressed Doug's @@ Alex comments. It was simply making some debug statements conditional upon ACE::debug () flag
Diffstat (limited to 'ace/WIN32_Asynch_IO.cpp')
-rw-r--r-- | ace/WIN32_Asynch_IO.cpp | 77 |
1 files changed, 40 insertions, 37 deletions
diff --git a/ace/WIN32_Asynch_IO.cpp b/ace/WIN32_Asynch_IO.cpp index e7c067f22fd..513af1bb79e 100644 --- a/ace/WIN32_Asynch_IO.cpp +++ b/ace/WIN32_Asynch_IO.cpp @@ -394,14 +394,14 @@ ACE_WIN32_Asynch_Read_Stream::shared_read (ACE_WIN32_Asynch_Read_Stream_Result * // Cleanup dynamically allocated Asynch_Result delete result; - // @@ Alex, shouldn't this only print an error if the ACE - // debugging level is above a certain value? - - // Return error - ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ReadFile")), - -1); + if (ACE::debug ()) + { + ACE_DEBUG ((LM_ERROR, + ASYS_TEXT ("%p\n"), + ASYS_TEXT ("ReadFile"))); + } + + return -1; } } @@ -634,13 +634,13 @@ ACE_WIN32_Asynch_Write_Stream::shared_write (ACE_WIN32_Asynch_Write_Stream_Resul // Cleanup dynamically allocated Asynch_Result delete result; - // @@ Alex, shouldn't this only print an error if the ACE - // debugging level is above a certain value? - - // Return error - ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("WriteFile")), -1); + if (ACE::debug ()) + { + ACE_DEBUG ((LM_ERROR, + ASYS_TEXT ("%p\n"), + ASYS_TEXT ("WriteFile"))); + } + return -1; } } @@ -1311,12 +1311,15 @@ ACE_WIN32_Asynch_Accept::accept (ACE_Message_Block &message_block, SOCK_STREAM, 0); if (accept_handle == ACE_INVALID_HANDLE) - // @@ Alex, shouldn't this only print an error if the ACE - // debugging level is above a certain value? - ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ACE_OS::socket")), - -1); + { + if (ACE::debug ()) + { + ACE_DEBUG ((LM_ERROR, + ASYS_TEXT ("%p\n"), + ASYS_TEXT ("ACE_OS::socket"))); + } + return -1; + } else // Remember to close the socket down if failures occur. close_accept_handle = 1; @@ -1370,14 +1373,14 @@ ACE_WIN32_Asynch_Accept::accept (ACE_Message_Block &message_block, // Cleanup dynamically allocated Asynch_Result. delete result; - - // @@ Alex, shouldn't this only print an error if the ACE - // debugging level is above a certain value? - - ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ReadFile")), - -1); + + if (ACE::debug ()) + { + ACE_DEBUG ((LM_ERROR, + ASYS_TEXT ("%p\n"), + ASYS_TEXT ("ReadFile"))); + } + return -1; } #else /* ACE_HAS_WINNT4 .......|| ACE_HAS_AIO_CALLS */ ACE_NOTSUP_RETURN (-1); @@ -1653,14 +1656,14 @@ ACE_WIN32_Asynch_Transmit_File::transmit_file (ACE_HANDLE file, // Cleanup dynamically allocated Asynch_Result delete result; - - // @@ Alex, shouldn't this only print an error if the ACE - // debugging level is above a certain value? - - ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("TransmitFile")), - -1); + + if (ACE::debug ()) + { + ACE_DEBUG ((LM_ERROR, + ASYS_TEXT ("%p\n"), + ASYS_TEXT ("TransmitFile"))); + } + return -1; } #else /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) */ ACE_NOTSUP_RETURN (-1); |