From c300dad17fc9b8c4fff16f3c587358cc71a27fb9 Mon Sep 17 00:00:00 2001 From: Phil Mesnier Date: Thu, 12 Jun 2014 17:55:00 +0000 Subject: Thu Jun 12 17:41:06 UTC 2014 Phil Mesnier * orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp: * orbsvcs/ImplRepo_Service/UpdateableServerInfo.h: * orbsvcs/ImplRepo_Service/UpdateableServerInfo.cpp: Fix for timely repo updates. This also avoids a potential crash at shutdown. --- TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp | 1 + TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.cpp | 2 +- TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.h | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'TAO/orbsvcs/ImplRepo_Service') diff --git a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp index b1ac3524390..1bb36788f8c 100644 --- a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp @@ -115,6 +115,7 @@ AsyncAccessManager::add_interest (ImR_ResponseHandler *rh) void AsyncAccessManager::final_state (void) { + this->info_.update_repo (); for (size_t i = 0; i < this->rh_list_.size(); i++) { ImR_ResponseHandler *rh = this->rh_list_[i]; diff --git a/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.cpp b/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.cpp index c0279c38087..c42bf7a30b4 100644 --- a/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.cpp @@ -27,7 +27,7 @@ UpdateableServerInfo::UpdateableServerInfo (Locator_Repository* repo, } } -UpdateableServerInfo::UpdateableServerInfo(const UpdateableServerInfo& other) +UpdateableServerInfo::UpdateableServerInfo (UpdateableServerInfo& other) :repo_ (other.repo_), si_ (other.si_), needs_update_(other.needs_update_) diff --git a/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.h b/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.h index 83deb24cedd..2a7e56b381c 100644 --- a/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.h +++ b/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.h @@ -42,7 +42,7 @@ public: const Server_Info_Ptr& si, bool reset_start_count = false); - UpdateableServerInfo(const UpdateableServerInfo& other ); + UpdateableServerInfo(UpdateableServerInfo& other ); /// destructor (updates repo if needed) ~UpdateableServerInfo(void); @@ -73,13 +73,13 @@ private: const UpdateableServerInfo& operator=(const UpdateableServerInfo& ); /// the repo - Locator_Repository* const repo_; + Locator_Repository* repo_; /// the retrieved, passed, or non-stored server info Server_Info_Ptr si_; /// the server info has changes and needs to be updated to the repo - mutable bool needs_update_; + bool needs_update_; }; #endif /* UPDATEABLE_SERVER_INFO_H */ -- cgit v1.2.1