Add destruction of listeners
The listeners aren't really destroyed and are only stopped. Further changes are required so that they won't be started again once they have been destroyed.
This commit is contained in:
@ -1111,6 +1111,18 @@ static void destroyServer(DCB *dcb, SERVER *server)
|
||||
}
|
||||
}
|
||||
|
||||
static void destroyListener(DCB *dcb, SERVICE *service, const char *name)
|
||||
{
|
||||
if (runtime_destroy_listener(service, name))
|
||||
{
|
||||
dcb_printf(dcb, "Destroyed listener '%s'\n", name);
|
||||
}
|
||||
else
|
||||
{
|
||||
dcb_printf(dcb, "Failed to destroy listener '%s', see log file for more details\n", name);
|
||||
}
|
||||
}
|
||||
|
||||
struct subcommand destroyoptions[] =
|
||||
{
|
||||
{
|
||||
@ -1119,6 +1131,12 @@ struct subcommand destroyoptions[] =
|
||||
"Usage: destroy server NAME",
|
||||
{ARG_TYPE_SERVER}
|
||||
},
|
||||
{
|
||||
"listener", 2, 2, destroyListener,
|
||||
"Destroy a listener",
|
||||
"Usage: destroy listener SERVICE NAME",
|
||||
{ARG_TYPE_SERVICE, ARG_TYPE_STRING}
|
||||
},
|
||||
{
|
||||
EMPTY_OPTION
|
||||
}
|
||||
|
Reference in New Issue
Block a user