diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-02-10 21:39:23 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-02-10 21:39:23 +0000 |
commit | 6c076f4dbd74e12946a483654ff02d38e50a3577 (patch) | |
tree | c5b56ac8d72a61146cfd521f81edb3760709eefb /ace/Map_Manager.cpp | |
parent | 865df4507bdebe16216a9c23b2e6388b04f43ef9 (diff) | |
download | ATCD-6c076f4dbd74e12946a483654ff02d38e50a3577.tar.gz |
foo
Diffstat (limited to 'ace/Map_Manager.cpp')
-rw-r--r-- | ace/Map_Manager.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ace/Map_Manager.cpp b/ace/Map_Manager.cpp index eac0b35b103..69644237498 100644 --- a/ace/Map_Manager.cpp +++ b/ace/Map_Manager.cpp @@ -322,6 +322,9 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::bind_i (const EXT_ID &ext_id, ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::bind_i"); int first_free = -1; + // We need to save errno since <shared_find> may set errno to + // ENOENT. + int error = errno; int index = this->shared_find (ext_id, first_free); if (index >= 0) @@ -329,8 +332,12 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::bind_i (const EXT_ID &ext_id, return 1; else - // We didn't find it, so let's bind it! - return this->shared_bind (ext_id, int_id, first_free); + { + // Restore errno. + errno = error; + // We didn't find it, so let's bind it! + return this->shared_bind (ext_id, int_id, first_free); + } } // Associate <ext_id> with <int_id>. If <ext_id> is not in the |