diff options
author | bala <balanatarajan@users.noreply.github.com> | 2003-10-28 18:31:01 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2003-10-28 18:31:01 +0000 |
commit | c20c95d4d526d887c9782960a3ff73f63c3c1c85 (patch) | |
tree | fd6ae8c3db752254802dfaafd1543974a4741e47 /TAO/tao/ORB_Table.cpp | |
parent | 3d20d6aedf2b56b86fe2a386777c7afbf1c19c93 (diff) | |
download | ATCD-c20c95d4d526d887c9782960a3ff73f63c3c1c85.tar.gz |
ChangeLogTag:Tue Oct 28 12:02:47 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/tao/ORB_Table.cpp')
-rw-r--r-- | TAO/tao/ORB_Table.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/TAO/tao/ORB_Table.cpp b/TAO/tao/ORB_Table.cpp index 4edbb624fd5..e1c8d820d8b 100644 --- a/TAO/tao/ORB_Table.cpp +++ b/TAO/tao/ORB_Table.cpp @@ -61,8 +61,8 @@ TAO_ORB_Table::bind (const char *orb_id, }; CORBA::String_var id = CORBA::string_dup (orb_id); - int result = this->table_.bind (id.in (), orb_core); + if (result == 0) { // Make sure the ORB table owns the ORB Core by increasing the @@ -72,7 +72,9 @@ TAO_ORB_Table::bind (const char *orb_id, // Only set the "first_orb_" member if the given ORB Core was // successfully added to the ORB table. if (this->first_orb_ == 0) - this->first_orb_ = orb_core; + { + this->first_orb_ = orb_core; + } (void) id._retn (); // ORB Table now owns the id. } @@ -84,9 +86,7 @@ TAO_ORB_Core * TAO_ORB_Table::find (const char *orb_id) { TAO_ORB_Core *found = 0; - this->table_.find (orb_id, found); - return found; } @@ -94,7 +94,6 @@ int TAO_ORB_Table::unbind (const char *orb_id) { Table::ENTRY *entry = 0; - int result = this->table_.find (orb_id, entry); if (result == 0) @@ -108,16 +107,23 @@ TAO_ORB_Table::unbind (const char *orb_id) result = this->table_.unbind (entry); if (result != 0) - return result; + { + return result; + } if (orb_core == this->first_orb_) { Iterator begin = this->begin (); Iterator end = this->end (); + if (begin != end) - this->first_orb_ = (*begin).int_id_; + { + this->first_orb_ = (*begin).int_id_; + } else - this->first_orb_ = 0; + { + this->first_orb_ = 0; + } } orb_core->_decr_refcnt (); |