MXS-2008 Update gateway and tests to initialize maxbase

Update gateway and tests to initialize maxbase using

  maxbase::init();

instead of initializing individual components.
This commit is contained in:
Johan Wikman
2018-08-21 09:37:40 +03:00
parent e852dcacdd
commit 3576780f78
6 changed files with 15 additions and 21 deletions

View File

@ -39,7 +39,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <maxbase/messagequeue.hh>
#include <maxbase/maxbase.hh>
#include <maxbase/stacktrace.hh>
#include <maxscale/alloc.h>
#include <maxscale/adminusers.h>
@ -1941,16 +1941,9 @@ int main(int argc, char **argv)
MXS_NOTICE("Module directory: %s", get_libdir());
MXS_NOTICE("Service cache: %s", get_cachedir());
if (!mxb::MessageQueue::init())
if (!maxbase::init())
{
MXS_ERROR("Failed to initialize message queue.");
rc = MAXSCALE_INTERNALERROR;
goto return_main;
}
if (!mxb::Worker::init())
{
MXS_ERROR("Failed to initialize workers.");
MXS_ERROR("Failed to initialize MaxScale base library.");
rc = MAXSCALE_INTERNALERROR;
goto return_main;
}
@ -2193,8 +2186,7 @@ int main(int argc, char **argv)
service_destroy_instances();
RoutingWorker::finish();
mxb::Worker::finish();
mxb::MessageQueue::finish();
maxbase::finish();
/*< Call finish on all modules. */
modules_process_finish();