1 #include "orbsvcs/Log_Macros.h"
2 #include "Locator_Repository.h"
3 #include "UpdateableServerInfo.h"
5 UpdateableServerInfo::UpdateableServerInfo (const Repository_Ptr
& repo
,
6 const ACE_CString
& name
,
9 si_(repo
->get_active_server (name
,pid
)),
14 UpdateableServerInfo::UpdateableServerInfo (const Repository_Ptr
& repo
,
15 const Server_Info_Ptr
& si
,
16 bool reset_start_count
)
21 if (reset_start_count
)
23 needs_update_
= repo_
.get() != 0;
24 si_
->active_info ()->start_count_
= 0;
28 UpdateableServerInfo::UpdateableServerInfo (UpdateableServerInfo
& other
)
31 needs_update_(other
.needs_update_
)
33 other
.needs_update_
= false;
36 UpdateableServerInfo::~UpdateableServerInfo ()
42 UpdateableServerInfo::server_info (const Server_Info_Ptr
& si
)
48 UpdateableServerInfo::notify_remote_access
49 (ImplementationRepository::AAM_Status state
)
51 repo_
->notify_remote_access (this->si_
->ping_id (), state
);
55 UpdateableServerInfo::update_repo ()
60 needs_update_
= false;
61 int err
= repo_
->update_server (si_
);
62 if (err
== 0 && !si_
->alt_info_
.null ())
64 err
= repo_
->update_server (si_
->alt_info_
);
68 ORBSVCS_ERROR ((LM_ERROR
,"(%P|%t) update repo failed err = %d, %p\n",
69 err
, "update_server"));
74 UpdateableServerInfo::operator-> () const
80 UpdateableServerInfo::operator* () const
86 const Server_Info_Ptr
&
87 UpdateableServerInfo::edit (bool active
)
89 needs_update_
= active
&& repo_
.get() != 0;
94 UpdateableServerInfo::null() const