diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-06-09 01:21:18 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-06-09 01:21:18 +0000 |
commit | bea7a8d718a916149d624666ab3eecd752da9a73 (patch) | |
tree | 07f03bdbc365b8db540783f8fe34aaf5d008aa87 /ace/Connector.cpp | |
parent | 9a89445f60332dabd261da892d3247d47cd4cec6 (diff) | |
download | ATCD-bea7a8d718a916149d624666ab3eecd752da9a73.tar.gz |
.
Diffstat (limited to 'ace/Connector.cpp')
-rw-r--r-- | ace/Connector.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/ace/Connector.cpp b/ace/Connector.cpp index a0e12e99768..9761a204c1e 100644 --- a/ace/Connector.cpp +++ b/ace/Connector.cpp @@ -457,14 +457,11 @@ ACE_Connector<SH, PR_CO_2>::connect_i (SH *&sh, } else { - // Make sure to save/restore the errno since <close> may - // change it. - - int error = errno; + // Save/restore errno. + ACE_Errno_Guard error (errno); // Make sure to close down the Channel to avoid descriptor // leaks. new_sh->close (0); - errno = error; } return -1; } @@ -535,7 +532,8 @@ template <class SH, PR_CO_1> int ACE_Connector<SH, PR_CO_2>::create_AST (SH *sh, const ACE_Synch_Options &synch_options) { - int error = errno; + // Save/restore errno. + ACE_Errno_Guard error (errno); ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::create_AST"); AST *ast; @@ -569,18 +567,10 @@ ACE_Connector<SH, PR_CO_2>::create_AST (SH *sh, goto fail3; ast->cancellation_id (cancellation_id); - // Reset this because something might have gone wrong - // elsewhere... - errno = error; return 0; } else - { - // Reset this because something might have gone wrong - // elsewhere... - errno = error; // EWOULDBLOCK - return 0; // Ok, everything worked just fine... - } + return 0; // Ok, everything worked just fine... } // Undo previous actions using the ol' "goto label and fallthru" |