Uncrustify maxscale

See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
This commit is contained in:
Niclas Antti
2018-09-09 22:26:19 +03:00
parent fa7ec95069
commit c447e5cf15
849 changed files with 35002 additions and 27238 deletions

View File

@ -6,68 +6,72 @@
*/
/*
Hartmut Holzgraefe 2014-08-31 21:01:06 UTC
Due to a copy/paste error I ended up with two [server2] sections instead of having [server2] and [server3].
There were no error or warning messages about this in skygw_err1.log or skygw_msg1.log but only the second [server2] was actually used.
Configuration file:
---8<------------------
[maxscale]
threads=1
[CLI]
type=service
router=cli
[CLI Listener]
type=listener
service=CLI
protocol=maxscaled
address=localhost
port=6603
[server1]
type=server
address=127.0.0.1
port=3000
protocol=MySQLBackend
[server2]
type=server
address=127.0.0.1
port=3001
protocol=MySQLBackend
[server2]
type=server
address=127.0.0.1
port=3002
protocol=MySQLBackend
-------->8---
maxadmin results:
---8<--------------------
MaxScale> list servers
Servers.
-------------------+-----------------+-------+----------------------+------------
Server | Address | Port | Status | Connections
-------------------+-----------------+-------+----------------------+------------
server1 | 127.0.0.1 | 3000 | Running | 0
server2 | 127.0.0.1 | 3002 | Running | 0
-------------------+-----------------+-------+----------------------+------------
------------->8---
So no entry for the first (actually correct) [server2] on port 3001,
but only for the duplicate 2nd [server2] with port set to 3002 ...
Comment 1 Mark Riddoch 2014-09-01 16:17:51 UTC
The ini file parser we use allows multiple sections with the same name and will combine the section contains. Within this restriction we now have added code that will detect the same parameter being set twice and will warn the user.
*/
* Hartmut Holzgraefe 2014-08-31 21:01:06 UTC
* Due to a copy/paste error I ended up with two [server2] sections instead of having [server2] and
* [server3].
*
* There were no error or warning messages about this in skygw_err1.log or skygw_msg1.log but only the second
* [server2] was actually used.
*
*
* Configuration file:
*
* ---8<------------------
* [maxscale]
* threads=1
*
* [CLI]
* type=service
* router=cli
*
* [CLI Listener]
* type=listener
* service=CLI
* protocol=maxscaled
* address=localhost
* port=6603
*
* [server1]
* type=server
* address=127.0.0.1
* port=3000
* protocol=MySQLBackend
*
* [server2]
* type=server
* address=127.0.0.1
* port=3001
* protocol=MySQLBackend
*
* [server2]
* type=server
* address=127.0.0.1
* port=3002
* protocol=MySQLBackend
* -------->8---
*
* maxadmin results:
*
*
* ---8<--------------------
* MaxScale> list servers
* Servers.
* -------------------+-----------------+-------+----------------------+------------
* Server | Address | Port | Status | Connections
* -------------------+-----------------+-------+----------------------+------------
* server1 | 127.0.0.1 | 3000 | Running | 0
* server2 | 127.0.0.1 | 3002 | Running | 0
* -------------------+-----------------+-------+----------------------+------------
* ------------->8---
*
* So no entry for the first (actually correct) [server2] on port 3001,
* but only for the duplicate 2nd [server2] with port set to 3002 ...
* Comment 1 Mark Riddoch 2014-09-01 16:17:51 UTC
* The ini file parser we use allows multiple sections with the same name and will combine the section
* contains. Within this restriction we now have added code that will detect the same parameter being set
* twice and will warn the user.
*
*/
#include <iostream>
@ -76,14 +80,16 @@ The ini file parser we use allows multiple sections with the same name and will
using namespace std;
int main(int argc, char *argv[])
int main(int argc, char* argv[])
{
TestConnections * Test = new TestConnections(argc, argv);
TestConnections* Test = new TestConnections(argc, argv);
Test->set_timeout(10);
Test->check_log_err(0, (char *) "Duplicate section found: server2", true);
Test->check_log_err(0, (char *)
"Failed to open, read or process the MaxScale configuration file /etc/maxscale.cnf. Exiting", true);
//Test->check_maxscale_alive(0);
Test->check_log_err(0, (char*) "Duplicate section found: server2", true);
Test->check_log_err(0,
(char*)
"Failed to open, read or process the MaxScale configuration file /etc/maxscale.cnf. Exiting",
true);
// Test->check_maxscale_alive(0);
int rval = Test->global_result;
delete Test;
return rval;