Putting the file descriptor first keeps it in line with dprintf.
Making the parameter set an initializer list allows matching against
multiple sets of parameters in one function call. This will compact the
parameter serialization by using the same code for the common service
parameters and the module parameters.
The atexit functions should be registered after there is a need for
them. This fixes the problem where cleanup functions were called before
the initialization for them was done. Also removed the header and footer
printint to stdout.
The paths were wrong in the scripts used to run tests. The same problem
was in the CMake files that used CMAKE_SOURCE_DIR instead of
CMAKE_CURRENT_SOURCE_DIR.
Added missing check for BUILD_SYSTEM_TESTS in avrorouter for the
workaround to building without all dependencies present.
This is the appropriate command for ON/OFF options controlled by the
user. Also removed the useless C99 option which must always be on (using
C11 would be another option).
The semaphore is only used when Worker::start() is called to synchronize
the startup of the two threads. Also asserted that the state is what we
expected it to be.
This guarantees that the caller of the start function will know whether
the worker is running by looking at its state.
This will prevent multiple successive stop calls to a worker which
happened when the monitors were altered via the REST API.
In tests, the log can now be setup as
int main()
{
mxb::Log log;
...
}
That will initialize the log so that it logs to a file called
<program-name>.log in the current directory and finalize it
when the program exits.
If any part of initalization fails, no resources are held.
At finalization, release all resources.
Also re-implement recent changes made to log_manager.cc that
did not automatically move over to log.cc.
Basically a copy of maxscale/debug.h, but with some name changes.
- ss_dassert -> mxb_assert
- ss_info_dassert -> mxb_assert_message
- ss_debug -> MXB_AT_DEBUG
Almost a verbatim copy of log_manager.[h|cc] with mxs changed
to mxb. The changes allow the MaxScale log manager to be moved
on top of this implementation.