Skip to content

Commit

Permalink
Add a log message for client orb in server (tango-controls#449)
Browse files Browse the repository at this point in the history
... to early warn about possible BAD_INV_ORDER_ORBHasShutdown during
access to a DeviceProxy created before server startup.
  • Loading branch information
mliszcz committed Jul 23, 2019
1 parent ab05abc commit 83fe61f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cppapi/server/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,10 @@ void Util::effective_job(int argc,char *argv[])

ApiUtil *au = Tango::ApiUtil::instance();
CORBA::ORB_ptr orb_clnt = au->get_orb();
bool log_client_orb_deleted = false;
if (CORBA::is_nil(orb_clnt) == false)
{
log_client_orb_deleted = true;
orb_clnt->destroy();
CORBA::release(orb_clnt);
au->set_orb(CORBA::ORB::_nil());
Expand Down Expand Up @@ -417,6 +419,10 @@ void Util::effective_job(int argc,char *argv[])
Logging::init(ds_name, (int)_tracelevel, ((!_FileDb) && _UseDb), *db, this);
#endif

if (log_client_orb_deleted)
{
cout1 << "Client ORB was initialized in before the server ORB, all proxies must be invalidated" << std::endl;
}
cout4 << "Connected to database" << endl;
if (get_db_cache() == NULL)
cout4 << "DbServerCache unavailable, will call db..." << endl;
Expand Down

0 comments on commit 83fe61f

Please sign in to comment.