From fa08a141e41857ba9515490ee6cf8af273b0a6fd Mon Sep 17 00:00:00 2001 From: Mark Riddoch Date: Wed, 25 Jun 2014 13:01:32 +0100 Subject: [PATCH] Fix to reload dbusers Tidyup show service output --- server/core/service.c | 22 +++++++++++++--------- server/modules/routing/debugcmd.c | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/server/core/service.c b/server/core/service.c index d3db48390..93d36bdfe 100644 --- a/server/core/service.c +++ b/server/core/service.c @@ -716,8 +716,8 @@ SERVER *ptr = service->databases; int i; printf("Service %p\n", service); - printf("\tService: %s\n", service->name); - printf("\tRouter: %s (%p)\n", service->routerModule, service->router); + printf("\tService: %s\n", service->name); + printf("\tRouter: %s (%p)\n", service->routerModule, service->router); printf("\tStarted: %s", asctime(localtime(&service->stats.started))); printf("\tBackend databases\n"); while (ptr) @@ -794,12 +794,13 @@ SERVER *server = service->databases; int i; dcb_printf(dcb, "Service %p\n", service); - dcb_printf(dcb, "\tService: %s\n", service->name); - dcb_printf(dcb, "\tRouter: %s (%p)\n", service->routerModule, - service->router); + dcb_printf(dcb, "\tService: %s\n", + service->name); + dcb_printf(dcb, "\tRouter: %s (%p)\n", + service->routerModule, service->router); if (service->router) service->router->diagnostics(service->router_instance, dcb); - dcb_printf(dcb, "\tStarted: %s", + dcb_printf(dcb, "\tStarted: %s", asctime(localtime(&service->stats.started))); if (service->n_filters) { @@ -818,9 +819,12 @@ int i; server->protocol); server = server->nextdb; } - dcb_printf(dcb, "\tUsers data: %p\n", service->users); - dcb_printf(dcb, "\tTotal connections: %d\n", service->stats.n_sessions); - dcb_printf(dcb, "\tCurrently connected: %d\n", service->stats.n_current); + dcb_printf(dcb, "\tUsers data: %p\n", + service->users); + dcb_printf(dcb, "\tTotal connections: %d\n", + service->stats.n_sessions); + dcb_printf(dcb, "\tCurrently connected: %d\n", + service->stats.n_current); } /** diff --git a/server/modules/routing/debugcmd.c b/server/modules/routing/debugcmd.c index fb638d541..914ba888e 100644 --- a/server/modules/routing/debugcmd.c +++ b/server/modules/routing/debugcmd.c @@ -300,7 +300,7 @@ struct subcommand reloadoptions[] = { { "dbusers", 1, reload_dbusers, "Reload the dbuser data for a service. E.g. reload dbusers \"splitter service\"", "Reload the dbuser data for a service. E.g. reload dbusers 0x849420", - {ARG_TYPE_DBUSERS, 0, 0} }, + {ARG_TYPE_SERVICE, 0, 0} }, { NULL, 0, NULL, NULL, NULL, {0, 0, 0} } };