Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgr/MgrClient: do not attempt to access a global variable for config #16544

Merged
merged 1 commit into from Jul 25, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/mgr/MgrClient.cc
Expand Up @@ -146,8 +146,7 @@ void MgrClient::reconnect()

// Don't send an open if we're just a client (i.e. doing
// command-sending, not stats etc)
if ((g_conf && !g_conf->name.is_client()) ||
service_daemon) {
if (!cct->_conf->name.is_client() || service_daemon) {
_send_open();
}

Expand All @@ -168,7 +167,7 @@ void MgrClient::_send_open()
open->service_name = service_name;
open->daemon_name = daemon_name;
} else {
open->daemon_name = g_conf->name.get_id();
open->daemon_name = cct->_conf->name.get_id();
}
if (service_daemon) {
open->service_daemon = service_daemon;
Expand Down Expand Up @@ -274,7 +273,7 @@ void MgrClient::send_report()
if (daemon_name.size()) {
report->daemon_name = daemon_name;
} else {
report->daemon_name = g_conf->name.get_id();
report->daemon_name = cct->_conf->name.get_id();
}
report->service_name = service_name;

Expand Down Expand Up @@ -410,7 +409,7 @@ int MgrClient::service_daemon_register(
daemon_dirty_status = true;

// late register?
if (g_conf->name.is_client() && session && session->con) {
if (cct->_conf->name.is_client() && session && session->con) {
_send_open();
}

Expand Down