diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-12-03 15:29:07 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-12-03 15:29:07 +0100 |
commit | a38c8bee8324936f8f836fa2210c7e7a41453d41 (patch) | |
tree | 059ba8e1d68b64ae1818ddba7976c7570604ee75 | |
parent | 94a67e4036a94c460d7be1159833a2f88d1eb1dd (diff) | |
download | ATCD-a38c8bee8324936f8f836fa2210c7e7a41453d41.tar.gz |
Const changes, log the pid we compare with in a check and added some docu
* TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp:
* TAO/orbsvcs/ImplRepo_Service/LiveCheck.h:
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp | 12 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/LiveCheck.h | 7 |
2 files changed, 15 insertions, 4 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp index 0e067706c88..410bd9ce27b 100644 --- a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp @@ -330,6 +330,12 @@ LiveEntry::set_pid (int pid) this->pid_ = pid; } +int +LiveEntry::pid (void) +{ + return this->pid_; +} + bool LiveEntry::has_pid (int pid) { @@ -660,7 +666,7 @@ LC_TimeoutGuard::~LC_TimeoutGuard (void) } } -bool LC_TimeoutGuard::blocked (void) +bool LC_TimeoutGuard::blocked (void) const { return this->blocked_; } @@ -894,8 +900,8 @@ LiveCheck::remove_server (const char *server, int pid) { ORBSVCS_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) LiveCheck::remove_server <%C> ") - ACE_TEXT ("pid <%d> does not match entry\n"), - server, pid)); + ACE_TEXT ("pid <%d> does not match entry pid <%d>\n"), + server, pid, entry->pid ())); } } } diff --git a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h index 6bf8b811b06..1bf35389347 100644 --- a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h +++ b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h @@ -138,6 +138,7 @@ class Locator_Export LiveEntry const char *server_name (void) const; void set_pid (int pid); bool has_pid (int pid); + int pid (void); private: LiveCheck *owner_; @@ -223,7 +224,7 @@ class Locator_Export LC_TimeoutGuard ~LC_TimeoutGuard (void); /// Returns true if the busy flag in the owner was already set. - bool blocked (void); + bool blocked (void) const; private: LiveCheck *owner_; @@ -294,6 +295,10 @@ class Locator_Export LiveCheck : public ACE_Event_Handler int handle_timeout_busy_; bool want_timeout_; ACE_Time_Value deferred_timeout_; + /// Contains a list of servers which got removed during the handle_timeout, + /// these will be removed at the end of the handle_timeout. Be aware that + /// between the moment the server has been added to the list and the handling + /// of this list the server can already be restarted again. NameStack removed_entries_; }; |