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:
@ -26,20 +26,20 @@ MXS_BEGIN_DECLS
|
||||
*/
|
||||
typedef struct rep_header
|
||||
{
|
||||
int payload_len; /*< Payload length (24 bits) */
|
||||
uint8_t seqno; /*< Response sequence number */
|
||||
uint8_t ok; /*< OK Byte from packet */
|
||||
uint32_t timestamp; /*< Timestamp - start of binlog record */
|
||||
uint8_t event_type; /*< Binlog event type */
|
||||
uint32_t serverid; /*< Server id of master */
|
||||
uint32_t event_size; /*< Size of header, post-header and body */
|
||||
uint32_t next_pos; /*< Position of next event */
|
||||
uint16_t flags; /*< Event flags */
|
||||
int payload_len; /*< Payload length (24 bits) */
|
||||
uint8_t seqno; /*< Response sequence number */
|
||||
uint8_t ok; /*< OK Byte from packet */
|
||||
uint32_t timestamp; /*< Timestamp - start of binlog record */
|
||||
uint8_t event_type; /*< Binlog event type */
|
||||
uint32_t serverid; /*< Server id of master */
|
||||
uint32_t event_size; /*< Size of header, post-header and body */
|
||||
uint32_t next_pos; /*< Position of next event */
|
||||
uint16_t flags; /*< Event flags */
|
||||
} REP_HEADER;
|
||||
|
||||
int blr_file_get_next_binlogname(const char *binlog_name);
|
||||
bool binlog_next_file_exists(const char* binlogdir, const char* binlog);
|
||||
uint32_t extract_field(uint8_t *src, int bits);
|
||||
int blr_file_get_next_binlogname(const char* binlog_name);
|
||||
bool binlog_next_file_exists(const char* binlogdir, const char* binlog);
|
||||
uint32_t extract_field(uint8_t* src, int bits);
|
||||
const char* binlog_event_name(int type);
|
||||
|
||||
static inline REP_HEADER construct_header(uint8_t* ptr)
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
/**
|
||||
* @file blr_defines.h - Various definitions for binlogrouter
|
||||
|
||||
*
|
||||
* @verbatim
|
||||
* Revision History
|
||||
*
|
||||
@ -30,12 +30,12 @@ MXS_BEGIN_DECLS
|
||||
|
||||
#define BINLOG_FNAMELEN 255
|
||||
#define BLR_PROTOCOL "MySQLBackend"
|
||||
#define BINLOG_MAGIC { 0xfe, 0x62, 0x69, 0x6e }
|
||||
#define BINLOG_MAGIC {0xfe, 0x62, 0x69, 0x6e}
|
||||
#define BINLOG_MAGIC_SIZE 4
|
||||
#define BINLOG_NAMEFMT "%s.%06d"
|
||||
#define BINLOG_NAME_ROOT "mysql-bin"
|
||||
|
||||
#define BINLOG_EVENT_HDR_LEN 19
|
||||
#define BINLOG_EVENT_HDR_LEN 19
|
||||
|
||||
/**
|
||||
* Binlog event types
|
||||
@ -79,8 +79,8 @@ MXS_BEGIN_DECLS
|
||||
#define MAX_EVENT_TYPE 0x23
|
||||
|
||||
/* New MariaDB event numbers start from 0xa0 */
|
||||
#define MARIADB_NEW_EVENTS_BEGIN 0xa0
|
||||
#define MARIADB_ANNOTATE_ROWS_EVENT 0xa0
|
||||
#define MARIADB_NEW_EVENTS_BEGIN 0xa0
|
||||
#define MARIADB_ANNOTATE_ROWS_EVENT 0xa0
|
||||
/* New MariaDB 10 event numbers start from here */
|
||||
#define MARIADB10_BINLOG_CHECKPOINT_EVENT 0xa1
|
||||
#define MARIADB10_GTID_EVENT 0xa2
|
||||
@ -89,7 +89,7 @@ MXS_BEGIN_DECLS
|
||||
#define MAX_EVENT_TYPE_MARIADB10 0xa3
|
||||
|
||||
/* Maximum event type so far */
|
||||
#define MAX_EVENT_TYPE_END MAX_EVENT_TYPE_MARIADB10
|
||||
#define MAX_EVENT_TYPE_END MAX_EVENT_TYPE_MARIADB10
|
||||
|
||||
/**
|
||||
* Binlog event flags
|
||||
|
||||
@ -48,16 +48,16 @@ MXS_BEGIN_DECLS
|
||||
#define CDC_FIELD_MAXLEN 8192
|
||||
#define CDC_REQUESTLINE_MAXLEN 8192
|
||||
|
||||
#define CDC_UNDEFINED 0
|
||||
#define CDC_ALLOC 1
|
||||
#define CDC_STATE_WAIT_FOR_AUTH 2
|
||||
#define CDC_STATE_AUTH_OK 3
|
||||
#define CDC_STATE_AUTH_FAILED 4
|
||||
#define CDC_STATE_AUTH_ERR 5
|
||||
#define CDC_STATE_AUTH_NO_SESSION 6
|
||||
#define CDC_STATE_REGISTRATION 7
|
||||
#define CDC_STATE_HANDLE_REQUEST 8
|
||||
#define CDC_STATE_CLOSE 9
|
||||
#define CDC_UNDEFINED 0
|
||||
#define CDC_ALLOC 1
|
||||
#define CDC_STATE_WAIT_FOR_AUTH 2
|
||||
#define CDC_STATE_AUTH_OK 3
|
||||
#define CDC_STATE_AUTH_FAILED 4
|
||||
#define CDC_STATE_AUTH_ERR 5
|
||||
#define CDC_STATE_AUTH_NO_SESSION 6
|
||||
#define CDC_STATE_REGISTRATION 7
|
||||
#define CDC_STATE_HANDLE_REQUEST 8
|
||||
#define CDC_STATE_CLOSE 9
|
||||
|
||||
#define CDC_UUID_LEN 32
|
||||
#define CDC_TYPE_LEN 16
|
||||
@ -66,11 +66,11 @@ MXS_BEGIN_DECLS
|
||||
*/
|
||||
typedef struct cdc_session
|
||||
{
|
||||
char user[CDC_USER_MAXLEN + 1]; /*< username for authentication */
|
||||
char uuid[CDC_UUID_LEN + 1]; /*< client uuid in registration */
|
||||
unsigned int flags[2]; /*< Received flags */
|
||||
uint8_t auth_data[SHA_DIGEST_LENGTH]; /*< Password Hash */
|
||||
int state; /*< CDC protocol state */
|
||||
char user[CDC_USER_MAXLEN + 1]; /*< username for authentication */
|
||||
char uuid[CDC_UUID_LEN + 1]; /*< client uuid in registration */
|
||||
unsigned int flags[2]; /*< Received flags */
|
||||
uint8_t auth_data[SHA_DIGEST_LENGTH]; /*< Password Hash */
|
||||
int state; /*< CDC protocol state */
|
||||
} CDC_session;
|
||||
|
||||
/**
|
||||
@ -78,14 +78,14 @@ typedef struct cdc_session
|
||||
*/
|
||||
typedef struct cdc_protocol
|
||||
{
|
||||
int state; /*< CDC protocol state */
|
||||
char user[CDC_USER_MAXLEN + 1]; /*< username for authentication */
|
||||
SPINLOCK lock; /*< Protocol structure lock */
|
||||
char type[CDC_TYPE_LEN + 1]; /*< Request Type */
|
||||
int state; /*< CDC protocol state */
|
||||
char user[CDC_USER_MAXLEN + 1]; /*< username for authentication */
|
||||
SPINLOCK lock; /*< Protocol structure lock */
|
||||
char type[CDC_TYPE_LEN + 1]; /*< Request Type */
|
||||
} CDC_protocol;
|
||||
|
||||
/* routines */
|
||||
extern int gw_hex2bin(uint8_t *out, const char *in, unsigned int len);
|
||||
extern int gw_hex2bin(uint8_t* out, const char* in, unsigned int len);
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
|
||||
@ -42,26 +42,26 @@ struct cli_session;
|
||||
*/
|
||||
typedef struct cli_instance
|
||||
{
|
||||
SPINLOCK lock; /*< The instance spinlock */
|
||||
SERVICE *service; /*< The debug cli service */
|
||||
SPINLOCK lock; /*< The instance spinlock */
|
||||
SERVICE* service; /*< The debug cli service */
|
||||
struct cli_session
|
||||
*sessions; /*< Linked list of sessions within this instance */
|
||||
* sessions; /*< Linked list of sessions within this instance */
|
||||
struct cli_instance
|
||||
*next; /*< The next pointer for the list of instances */
|
||||
* next; /*< The next pointer for the list of instances */
|
||||
} CLI_INSTANCE;
|
||||
|
||||
/**
|
||||
* The CLI_SESSION structure. As CLI_SESSION is created for each user that logs into
|
||||
* the DEBUG CLI.
|
||||
*/
|
||||
#define CMDBUFLEN 2048
|
||||
#define CMDBUFLEN 2048
|
||||
|
||||
typedef struct cli_session
|
||||
{
|
||||
char cmdbuf[CMDBUFLEN]; /*< The command buffer used to build up user commands */
|
||||
MXS_SESSION *session; /*< The gateway session */
|
||||
char cmdbuf[CMDBUFLEN]; /*< The command buffer used to build up user commands */
|
||||
MXS_SESSION* session; /*< The gateway session */
|
||||
struct cli_session
|
||||
*next; /*< The next pointer for the list of sessions */
|
||||
* next; /*< The next pointer for the list of sessions */
|
||||
} CLI_SESSION;
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
@ -38,7 +38,7 @@ MXS_BEGIN_DECLS
|
||||
typedef struct telnetd
|
||||
{
|
||||
int state; /**< The connection state */
|
||||
char *username; /**< The login name of the user */
|
||||
char* username; /**< The login name of the user */
|
||||
} TELNETD;
|
||||
|
||||
#define TELNETD_STATE_LOGIN 1 /**< Issued login prompt */
|
||||
|
||||
Reference in New Issue
Block a user