Move server disk space threshold setting to private Server-class

The setting can be read and written simultaneously and is protected with
a mutex.

The public SERVER-class is now abstract.
This commit is contained in:
Esa Korhonen
2018-12-10 16:51:35 +02:00
parent 7cf73e0f13
commit 2b0eac2cd0
6 changed files with 77 additions and 43 deletions

View File

@ -16,6 +16,7 @@
#include <iostream>
#include <maxscale/config.hh>
#include <maxscale/mysql_utils.hh>
#include "../internal/server.hh"
using namespace std;
@ -78,9 +79,7 @@ int test(bool success, const char* zHost, const char* zUser, const char* zPasswo
MXS_CONFIG* config = config_get_global_options();
config->local_address = const_cast<char*>(zAddress);
SERVER server;
memset(&server, 0, sizeof(server));
Server server;
strcpy(server.address, zHost);
server.port = 3306;