MXS-2271 Change Monitor->m_name to std::string

Also, monitor address is no longer printed.
This commit is contained in:
Esa Korhonen
2019-03-28 18:12:34 +02:00
parent d7971fa44d
commit d89f0c062b
6 changed files with 84 additions and 84 deletions

View File

@ -1418,16 +1418,14 @@ static void destroyListener(DCB* dcb, SERVICE* service, const char* name)
static void destroyMonitor(DCB* dcb, Monitor* monitor)
{
char name[strlen(monitor->m_name) + 1];
strcpy(name, monitor->m_name);
std::string name = monitor->name();
if (runtime_destroy_monitor(monitor))
{
dcb_printf(dcb, "Destroyed monitor '%s'\n", name);
dcb_printf(dcb, "Destroyed monitor '%s'\n", name.c_str());
}
else
{
dcb_printf(dcb, "Failed to destroy monitor '%s', see log file for more details\n", name);
dcb_printf(dcb, "Failed to destroy monitor '%s', see log file for more details\n", name.c_str());
}
}