Fix mistakes in merging.

This commit is contained in:
counterpoint
2015-11-11 11:31:07 +00:00
parent dee20fe077
commit 2183d5d3c5
2 changed files with 105 additions and 107 deletions

View File

@ -56,11 +56,6 @@
static HASHTABLE *buffer_hashtable = NULL; static HASHTABLE *buffer_hashtable = NULL;
#endif #endif
/** Defined in log_manager.cc */
extern int lm_enabled_logfiles_bitmask;
extern size_t log_ses_count[];
extern __thread log_info_t tls_log_info;
static buffer_object_t* gwbuf_remove_buffer_object( static buffer_object_t* gwbuf_remove_buffer_object(
GWBUF* buf, GWBUF* buf,
buffer_object_t* bufobj); buffer_object_t* bufobj);

View File

@ -112,104 +112,108 @@ static void telnetdShowUsers(DCB *);
struct subcommand showoptions[] = { struct subcommand showoptions[] = {
#if defined(BUFFER_TRACE) #if defined(BUFFER_TRACE)
{ "buffers", 0, dprintAllBuffers, { "buffers", 0, dprintAllBuffers,
"Show all buffers with backtrace", "Show all buffers with backtrace",
"Show all buffers with backtrace", "Show all buffers with backtrace",
{0, 0, 0} }, {0, 0, 0} },
#endif #endif
{ "dcbs", 0, dprintAllDCBs, { "dcbs", 0, dprintAllDCBs,
"Show all descriptor control blocks (network connections)", "Show all descriptor control blocks (network connections)",
"Show all descriptor control blocks (network connections)", "Show all descriptor control blocks (network connections)",
{0, 0, 0} }, {0, 0, 0} },
{ "dcb", 1, dprintDCB, { "dcb", 1, dprintDCB,
"Show a single descriptor control block e.g. show dcb 0x493340", "Show a single descriptor control block e.g. show dcb 0x493340",
"Show a single descriptor control block e.g. show dcb 0x493340", "Show a single descriptor control block e.g. show dcb 0x493340",
{ARG_TYPE_DCB, 0, 0} }, {ARG_TYPE_DCB, 0, 0} },
{ "dbusers", 1, dcb_usersPrint, { "dbusers", 1, dcb_usersPrint,
"Show statistics and user names for a service's user table.\n\t\tExample : show dbusers <service name>", "Show statistics and user names for a service's user table.\n"
"Show statistics and user names for a service's user table.\n\t\tExample : show dbusers <ptr of 'User's data' from services list>|<service name>", "\t\tExample : show dbusers <service name>",
{ARG_TYPE_DBUSERS, 0, 0} }, "Show statistics and user names for a service's user table.\n"
{ "epoll", 0, dprintPollStats, "\t\tExample : show dbusers <ptr of 'User's data' from services list>|<service name>",
"Show the poll statistics", {ARG_TYPE_DBUSERS, 0, 0} },
"Show the poll statistics", { "epoll", 0, dprintPollStats,
{0, 0, 0} }, "Show the poll statistics",
{ "eventq", 0, dShowEventQ, "Show the poll statistics",
"Show the queue of events waiting to be processed", {0, 0, 0} },
"Show the queue of events waiting to be processed", { "eventq", 0, dShowEventQ,
{0, 0, 0} }, "Show the queue of events waiting to be processed",
{ "eventstats", 0, dShowEventStats, "Show the queue of events waiting to be processed",
"Show the event statistics", {0, 0, 0} },
"Show the event statistics", { "eventstats", 0, dShowEventStats,
{0, 0, 0} }, "Show the event statistics",
{ "feedbackreport", 0, moduleShowFeedbackReport, "Show the event statistics",
"Show the report of MaxScale loaded modules, suitable for Notification Service", {0, 0, 0} },
"Show the report of MaxScale loaded modules, suitable for Notification Service", { "feedbackreport", 0, moduleShowFeedbackReport,
{0, 0, 0} }, "Show the report of MaxScale loaded modules, suitable for Notification Service",
{ "filter", 1, dprintFilter, "Show the report of MaxScale loaded modules, suitable for Notification Service",
"Show details of a filter, called with a filter name", {0, 0, 0} },
"Show details of a filter, called with the address of a filter", { "filter", 1, dprintFilter,
{ARG_TYPE_FILTER, 0, 0} }, "Show details of a filter, called with a filter name",
{ "filters", 0, dprintAllFilters, "Show details of a filter, called with the address of a filter",
"Show all filters", {ARG_TYPE_FILTER, 0, 0} },
"Show all filters", { "filters", 0, dprintAllFilters,
{0, 0, 0} }, "Show all filters",
{ "modules", 0, dprintAllModules, "Show all filters",
"Show all currently loaded modules", {0, 0, 0} },
"Show all currently loaded modules", { "modules", 0, dprintAllModules,
{0, 0, 0} }, "Show all currently loaded modules",
{ "monitor", 1, monitorShow, "Show all currently loaded modules",
"Show the monitor details", {0, 0, 0} },
"Show the monitor details", { "monitor", 1, monitorShow,
{ARG_TYPE_MONITOR, 0, 0} }, "Show the monitor details",
{ "monitors", 0, monitorShowAll, "Show the monitor details",
"Show the monitors that are configured", {ARG_TYPE_MONITOR, 0, 0} },
"Show the monitors that are configured", { "monitors", 0, monitorShowAll,
{0, 0, 0} }, "Show the monitors that are configured",
{ "persistent", 1, dprintPersistentDCBs, "Show the monitors that are configured",
"Show persistent pool for a named server, e.g. show persistent dbnode1", {0, 0, 0} },
"Show persistent pool for a server, e.g. show persistent 0x485390. The address may also be replaced with the server name from the configuration file", { "persistent", 1, dprintPersistentDCBs,
{ARG_TYPE_SERVER, 0, 0} }, "Show persistent pool for a named server, e.g. show persistent dbnode1",
{ "server", 1, dprintServer, "Show persistent pool for a server, e.g. show persistent 0x485390. "
"Show details for a named server, e.g. show server dbnode1", "The address may also be replaced with the server name from the configuration file",
"Show details for a server, e.g. show server 0x485390. The address may also be repalced with the server name from the configuration file", {ARG_TYPE_SERVER, 0, 0} },
{ARG_TYPE_SERVER, 0, 0} }, { "server", 1, dprintServer,
{ "servers", 0, dprintAllServers, "Show details for a named server, e.g. show server dbnode1",
"Show all configured servers", "Show details for a server, e.g. show server 0x485390. The address may also be "
"Show all configured servers", "repalced with the server name from the configuration file",
{0, 0, 0} }, {ARG_TYPE_SERVER, 0, 0} },
{ "serversjson", 0, dprintAllServersJson, { "servers", 0, dprintAllServers,
"Show all configured servers in JSON format", "Show all configured servers",
"Show all configured servers in JSON format", "Show all configured servers",
{0, 0, 0} }, {0, 0, 0} },
{ "services", 0, dprintAllServices, { "serversjson", 0, dprintAllServersJson,
"Show all configured services in MaxScale", "Show all configured servers in JSON format",
"Show all configured services in MaxScale", "Show all configured servers in JSON format",
{0, 0, 0} }, {0, 0, 0} },
{ "service", 1, dprintService, { "services", 0, dprintAllServices,
"Show a single service in MaxScale, may be passed a service name", "Show all configured services in MaxScale",
"Show a single service in MaxScale, may be passed a service name or address of a service object", "Show all configured services in MaxScale",
{ARG_TYPE_SERVICE, 0, 0} }, {0, 0, 0} },
{ "session", 1, dprintSession, { "service", 1, dprintService,
"Show a single session in MaxScale, e.g. show session 0x284830", "Show a single service in MaxScale, may be passed a service name",
"Show a single session in MaxScale, e.g. show session 0x284830", "Show a single service in MaxScale, may be passed a service name or address of a service object",
{ARG_TYPE_SESSION, 0, 0} }, {ARG_TYPE_SERVICE, 0, 0} },
{ "sessions", 0, dprintAllSessions, { "session", 1, dprintSession,
"Show all active sessions in MaxScale", "Show a single session in MaxScale, e.g. show session 0x284830",
"Show all active sessions in MaxScale", "Show a single session in MaxScale, e.g. show session 0x284830",
{0, 0, 0} }, {ARG_TYPE_SESSION, 0, 0} },
{ "tasks", 0, hkshow_tasks, { "sessions", 0, dprintAllSessions,
"Show all active housekeeper tasks in MaxScale", "Show all active sessions in MaxScale",
"Show all active housekeeper tasks in MaxScale", "Show all active sessions in MaxScale",
{0, 0, 0} }, {0, 0, 0} },
{ "threads", 0, dShowThreads, { "tasks", 0, hkshow_tasks,
"Show the status of the polling threads in MaxScale", "Show all active housekeeper tasks in MaxScale",
"Show the status of the polling threads in MaxScale", "Show all active housekeeper tasks in MaxScale",
{0, 0, 0} }, {0, 0, 0} },
{ "users", 0, telnetdShowUsers, { "threads", 0, dShowThreads,
"Show statistics and user names for the debug interface", "Show the status of the polling threads in MaxScale",
"Show statistics and user names for the debug interface", "Show the status of the polling threads in MaxScale",
{0, 0, 0} }, {0, 0, 0} },
{ NULL, 0, NULL, NULL, NULL, { "users", 0, telnetdShowUsers,
{0, 0, 0} } "Show statistics and user names for the debug interface",
"Show statistics and user names for the debug interface",
{0, 0, 0} },
{ NULL, 0, NULL, NULL, NULL,
{0, 0, 0} }
}; };
/** /**
@ -714,14 +718,13 @@ static struct {
* Convert a string argument to a numeric, observing prefixes * Convert a string argument to a numeric, observing prefixes
* for number bases, e.g. 0x for hex, 0 for octal * for number bases, e.g. 0x for hex, 0 for octal
* *
* @param dcb The client DCB * @param mode The CLI mode
* @param mode The CLI mode * @param arg The string representation of the argument
* @param arg The string representation of the argument * @param arg_type The target type for the argument
* @param arg_type The target type for the argument
* @return The argument as a long integer * @return The argument as a long integer
*/ */
static unsigned long static unsigned long
convert_arg(DCB* dcb, int mode, char *arg, int arg_type) convert_arg(int mode, char *arg, int arg_type)
{ {
unsigned long rval; unsigned long rval;
SERVICE *service; SERVICE *service;