diff options
Diffstat (limited to 'TAO/orbsvcs')
-rwxr-xr-x | TAO/orbsvcs/DevGuideExamples/ImplRepo/run_test.pl | 12 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp | 35 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/LiveCheck.h | 2 |
3 files changed, 28 insertions, 21 deletions
diff --git a/TAO/orbsvcs/DevGuideExamples/ImplRepo/run_test.pl b/TAO/orbsvcs/DevGuideExamples/ImplRepo/run_test.pl index ee1463141af..b3ce3cd907f 100755 --- a/TAO/orbsvcs/DevGuideExamples/ImplRepo/run_test.pl +++ b/TAO/orbsvcs/DevGuideExamples/ImplRepo/run_test.pl @@ -246,6 +246,12 @@ if ($SDN_status != 0) { exit 1; } +$ACT_status = $ACT->TerminateWaitKill ($act->ProcessStopWaitInterval()); + +if ($ACT_status != 0) { + print STDERR "ERROR: ImR_Activator returned $ACT_status\n"; + $status = 1; +} $IR_status = $IR->TerminateWaitKill ($imr->ProcessStopWaitInterval()); @@ -254,12 +260,6 @@ if ($IR_status != 0) { $status = 1; } -$ACT_status = $ACT->TerminateWaitKill ($act->ProcessStopWaitInterval()); - -if ($ACT_status != 0) { - print STDERR "ERROR: ImR_Activator returned $ACT_status\n"; - $status = 1; -} $imr->DeleteFile ($implrepo_ior); $act->DeleteFile ($implrepo_ior); diff --git a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp index e46ee0b2a61..ea1f1f5c60b 100644 --- a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp @@ -273,7 +273,10 @@ LiveEntry::status (LiveStatus l) } else { - this->owner_->remove_per_client_entry (this); + if (this->owner_->remove_per_client_entry (this)) + { + delete (this); + } } } @@ -480,8 +483,8 @@ PingReceiver::ping (void) ACE_TEXT ("(%P|%t) PingReceiver::ping received from %C\n"), this->entry_->server_name ())); } - this->entry_->status (LS_ALIVE); this->entry_->release_callback (); + this->entry_->status (LS_ALIVE); } PortableServer::ObjectId_var oid = this->poa_->servant_to_id (this); poa_->deactivate_object (oid.in()); @@ -510,8 +513,8 @@ PingReceiver::ping_excep (Messaging::ExceptionHolder * excep_holder) { if (this->entry_ != 0) { - this->entry_->status (LS_TRANSIENT); this->entry_->release_callback (); + this->entry_->status (LS_TRANSIENT); } break; } @@ -519,8 +522,8 @@ PingReceiver::ping_excep (Messaging::ExceptionHolder * excep_holder) { if (this->entry_ != 0) { - this->entry_->status (LS_DEAD); this->entry_->release_callback (); + this->entry_->status (LS_DEAD); } } } @@ -529,16 +532,16 @@ PingReceiver::ping_excep (Messaging::ExceptionHolder * excep_holder) { if (this->entry_ != 0) { - this->entry_->status (LS_TIMEDOUT); this->entry_->release_callback (); + this->entry_->status (LS_TIMEDOUT); } } catch (CORBA::Exception &) { if (this->entry_ != 0) { - this->entry_->status (LS_DEAD); this->entry_->release_callback (); + this->entry_->status (LS_DEAD); } } @@ -622,14 +625,17 @@ LiveCheck::LiveCheck () LiveCheck::~LiveCheck (void) { - while (this->entry_map_.current_size() > 0) + for (LiveEntryMap::iterator em (this->entry_map_); !em.done(); em++) + { + delete em->int_id_; + } + this->entry_map_.unbind_all(); + + for (PerClientStack::iterator pc (this->per_client_); !pc.done(); pc++) { - LiveEntryMap::iterator i (this->entry_map_); - LiveEntryMap::value_type *pair = 0; - i.next (pair); - this->entry_map_.unbind(pair); - delete pair->item(); + delete *pc; } + this->per_client_.reset (); } void @@ -725,6 +731,7 @@ LiveCheck::handle_timeout (const ACE_Time_Value &, if (status != LS_PING_AWAY && status != LS_TRANSIENT) { this->per_client_.remove (entry); + delete entry; } } } @@ -771,10 +778,10 @@ LiveCheck::remove_server (const char *server) delete entry; } -void +bool LiveCheck::remove_per_client_entry (LiveEntry *e) { - this->per_client_.remove (e); + return (this->per_client_.remove (e) == 0); } bool diff --git a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h index 01de6f6fd0a..466b36a7974 100644 --- a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h +++ b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h @@ -254,7 +254,7 @@ class Locator_Export LiveCheck : public ACE_Event_Handler void remove_server (const char *server); - void remove_per_client_entry (LiveEntry *entry); + bool remove_per_client_entry (LiveEntry *entry); bool add_listener (LiveListener *listener); |