MXS-2178 Add WD workaround to REST-API and maxadmin

This commit is contained in:
Johan Wikman
2018-11-21 12:06:02 +02:00
parent be12cab16d
commit 78829429ae
4 changed files with 25 additions and 21 deletions

View File

@ -27,19 +27,19 @@
#define MXS_MODULE_NAME "cli"
#include <debugcli.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <maxbase/atomic.h>
#include <maxscale/alloc.h>
#include <maxscale/dcb.h>
#include <maxscale/log.h>
#include <maxscale/modinfo.h>
#include <maxscale/poll.h>
#include <maxscale/router.h>
#include <maxscale/service.h>
#include <maxscale/session.h>
#include <maxscale/router.h>
#include <maxscale/modinfo.h>
#include <maxbase/atomic.h>
#include <maxscale/dcb.h>
#include <maxscale/alloc.h>
#include <maxscale/poll.h>
#include <debugcli.h>
#include <maxscale/log.h>
/* The router entry points */
static MXS_ROUTER* createInstance(SERVICE* service, MXS_CONFIG_PARAMETER* params);

View File

@ -26,19 +26,19 @@
#define MXS_MODULE_NAME "debugcli"
#include <debugcli.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <maxbase/atomic.h>
#include <maxscale/alloc.h>
#include <maxscale/dcb.h>
#include <maxscale/log.h>
#include <maxscale/modinfo.h>
#include <maxscale/poll.h>
#include <maxscale/router.h>
#include <maxscale/service.h>
#include <maxscale/session.h>
#include <maxscale/router.h>
#include <maxscale/modinfo.h>
#include <maxbase/atomic.h>
#include <maxscale/dcb.h>
#include <maxscale/alloc.h>
#include <maxscale/poll.h>
#include <debugcli.h>
#include <maxscale/log.h>
/* The router entry points */
static MXS_ROUTER* createInstance(SERVICE* service, MXS_CONFIG_PARAMETER* params);

View File

@ -35,9 +35,9 @@
#include <sys/syslog.h>
#include <telnetd.h>
#include <maxbase/atomic.h>
#include <maxscale/adminusers.h>
#include <maxscale/alloc.h>
#include <maxbase/atomic.h>
#include <maxscale/buffer.h>
#include <maxscale/config.h>
#include <maxscale/dcb.h>
@ -47,13 +47,12 @@
#include <maxscale/maxscale.h>
#include <maxscale/modulecmd.h>
#include <maxscale/router.h>
#include <maxscale/routingworker.hh>
#include <maxscale/server.hh>
#include <maxscale/service.h>
#include <maxscale/users.h>
#include <maxscale/utils.h>
#include <maxscale/version.h>
#include <maxscale/routingworker.h>
#include <maxscale/routingworker.hh>
#include <debugcli.h>
@ -2102,6 +2101,10 @@ static const char item_separator[] =
*/
int execute_cmd(CLI_SESSION* cli)
{
mxs::RoutingWorker* worker = mxs::RoutingWorker::get_current();
mxb_assert(worker == mxs::RoutingWorker::get(mxs::RoutingWorker::MAIN));
mxs::WatchdogWorkaround workaround(worker);
DCB* dcb = cli->session->client_dcb;
int argc, i, j, found = 0;
char* args[MAXARGS + 4];