Format core source code and headers
Formatted core source code and headers with Astyle.
This commit is contained in:
@ -41,7 +41,8 @@ public:
|
||||
// pointer_type : The type of a pointer to an element, either "uint8_t*" or "const uint8_t*".
|
||||
// reference_type: The type of a reference to an element, either "uint8_t&" or "const uint8_t&".
|
||||
template<class buf_type, class pointer_type, class reference_type>
|
||||
class iterator_base : public std::iterator<std::forward_iterator_tag, // The type of the iterator
|
||||
class iterator_base : public std::iterator <
|
||||
std::forward_iterator_tag, // The type of the iterator
|
||||
uint8_t, // The type of the elems
|
||||
std::ptrdiff_t, // Difference between two its
|
||||
pointer_type, // The type of pointer to an elem
|
||||
|
@ -71,7 +71,8 @@ typedef struct ssl_listener
|
||||
char *ssl_key; /*< SSL private key */
|
||||
char *ssl_ca_cert; /*< SSL CA certificate */
|
||||
bool ssl_init_done; /*< If SSL has already been initialized for this service */
|
||||
struct ssl_listener *next; /*< Next SSL configuration, currently used to store obsolete configurations */
|
||||
struct ssl_listener
|
||||
*next; /*< Next SSL configuration, currently used to store obsolete configurations */
|
||||
} SSL_LISTENER;
|
||||
|
||||
int ssl_authenticate_client(struct dcb *dcb, bool is_capable);
|
||||
|
@ -358,7 +358,8 @@ tmp_rsa_callback(SSL *s, int is_export, int keylength)
|
||||
{
|
||||
RSA *rsa_tmp = NULL;
|
||||
|
||||
switch (keylength) {
|
||||
switch (keylength)
|
||||
{
|
||||
case 512:
|
||||
if (rsa_512)
|
||||
{
|
||||
|
@ -59,7 +59,8 @@ static const size_t timestamp_len = (4+1 +2+1 +2+1 +2+1 +2+1 +2+3 +1) * sizeof(
|
||||
|
||||
static const char* timestamp_formatstr_hp = "%04d-%02d-%02d %02d:%02d:%02d.%03d ";
|
||||
/** One for terminating '\0' */
|
||||
static const size_t timestamp_len_hp = (4+1 +2+1 +2+1 +2+1 +2+1 +2+1+3+3 +1) * sizeof(char);
|
||||
static const size_t timestamp_len_hp = (4 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 3 + 3 + 1) * sizeof(
|
||||
char);
|
||||
|
||||
struct skygw_thread_st
|
||||
{
|
||||
|
@ -571,16 +571,20 @@ static uint64_t unpack_bytes(uint8_t *ptr, size_t bytes)
|
||||
val = (uint64_t)ptr[3] | ((uint64_t)ptr[2] << 8) | ((uint64_t)ptr[1] << 16) | ((uint64_t)ptr[0] << 24);
|
||||
break;
|
||||
case 5:
|
||||
val = (uint64_t)ptr[4] | ((uint64_t)ptr[3] << 8) | ((uint64_t)ptr[2] << 16) | ((uint64_t)ptr[1] << 24) | ((uint64_t)ptr[0] << 32);
|
||||
val = (uint64_t)ptr[4] | ((uint64_t)ptr[3] << 8) | ((uint64_t)ptr[2] << 16) | ((uint64_t)ptr[1] << 24) | ((
|
||||
uint64_t)ptr[0] << 32);
|
||||
break;
|
||||
case 6:
|
||||
val = (uint64_t)ptr[5] | ((uint64_t)ptr[4] << 8) | ((uint64_t)ptr[3] << 16) | ((uint64_t)ptr[2] << 24) | ((uint64_t)ptr[1] << 32) | ((uint64_t)ptr[0] << 40);
|
||||
val = (uint64_t)ptr[5] | ((uint64_t)ptr[4] << 8) | ((uint64_t)ptr[3] << 16) | ((uint64_t)ptr[2] << 24) | ((
|
||||
uint64_t)ptr[1] << 32) | ((uint64_t)ptr[0] << 40);
|
||||
break;
|
||||
case 7:
|
||||
val = (uint64_t)ptr[6] | ((uint64_t)ptr[5] << 8) | ((uint64_t)ptr[4] << 16) | ((uint64_t)ptr[3] << 24) | ((uint64_t)ptr[2] << 32) | ((uint64_t)ptr[1] << 40) | ((uint64_t)ptr[0] << 48);
|
||||
val = (uint64_t)ptr[6] | ((uint64_t)ptr[5] << 8) | ((uint64_t)ptr[4] << 16) | ((uint64_t)ptr[3] << 24) | ((
|
||||
uint64_t)ptr[2] << 32) | ((uint64_t)ptr[1] << 40) | ((uint64_t)ptr[0] << 48);
|
||||
break;
|
||||
case 8:
|
||||
val = (uint64_t)ptr[7] | ((uint64_t)ptr[6] << 8) | ((uint64_t)ptr[5] << 16) | ((uint64_t)ptr[4] << 24) | ((uint64_t)ptr[3] << 32) | ((uint64_t)ptr[2] << 40) | ((uint64_t)ptr[1] << 48) | ((uint64_t)ptr[0] << 56);
|
||||
val = (uint64_t)ptr[7] | ((uint64_t)ptr[6] << 8) | ((uint64_t)ptr[5] << 16) | ((uint64_t)ptr[4] << 24) | ((
|
||||
uint64_t)ptr[3] << 32) | ((uint64_t)ptr[2] << 40) | ((uint64_t)ptr[1] << 48) | ((uint64_t)ptr[0] << 56);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1629,11 +1629,16 @@ dShowEventStats(DCB *pdcb)
|
||||
int i;
|
||||
|
||||
dcb_printf(pdcb, "\nEvent statistics.\n");
|
||||
dcb_printf(pdcb, "Maximum queue time: %3" PRId64 "00ms\n", ts_stats_get(queueStats.maxqtime, TS_STATS_MAX));
|
||||
dcb_printf(pdcb, "Maximum execution time: %3" PRId64 "00ms\n", ts_stats_get(queueStats.maxexectime, TS_STATS_MAX));
|
||||
dcb_printf(pdcb, "Maximum event queue length: %3" PRId64 "\n", ts_stats_get(pollStats.evq_max, TS_STATS_MAX));
|
||||
dcb_printf(pdcb, "Total event queue length: %3" PRId64 "\n", ts_stats_get(pollStats.evq_length, TS_STATS_SUM));
|
||||
dcb_printf(pdcb, "Average event queue length: %3" PRId64 "\n", ts_stats_get(pollStats.evq_length, TS_STATS_AVG));
|
||||
dcb_printf(pdcb, "Maximum queue time: %3" PRId64 "00ms\n", ts_stats_get(queueStats.maxqtime,
|
||||
TS_STATS_MAX));
|
||||
dcb_printf(pdcb, "Maximum execution time: %3" PRId64 "00ms\n", ts_stats_get(queueStats.maxexectime,
|
||||
TS_STATS_MAX));
|
||||
dcb_printf(pdcb, "Maximum event queue length: %3" PRId64 "\n", ts_stats_get(pollStats.evq_max,
|
||||
TS_STATS_MAX));
|
||||
dcb_printf(pdcb, "Total event queue length: %3" PRId64 "\n", ts_stats_get(pollStats.evq_length,
|
||||
TS_STATS_SUM));
|
||||
dcb_printf(pdcb, "Average event queue length: %3" PRId64 "\n", ts_stats_get(pollStats.evq_length,
|
||||
TS_STATS_AVG));
|
||||
dcb_printf(pdcb, "\n");
|
||||
dcb_printf(pdcb, " | Number of events\n");
|
||||
dcb_printf(pdcb, "Duration | Queued | Executed\n");
|
||||
|
@ -359,7 +359,8 @@ int test_domain_matching()
|
||||
const char *ns = "mysqlmon";
|
||||
const char *id = "test_domain_matching";
|
||||
|
||||
modulecmd_arg_type_t args[] = {
|
||||
modulecmd_arg_type_t args[] =
|
||||
{
|
||||
{MODULECMD_ARG_MONITOR | MODULECMD_ARG_NAME_MATCHES_DOMAIN, ""}
|
||||
};
|
||||
|
||||
|
@ -755,7 +755,8 @@ char* replace_literal(char* haystack, const char* needle, const char* replacemen
|
||||
memcpy(newstr, haystack, match.rm_so + 1);
|
||||
memcpy(newstr + match.rm_so + 1, replacement, rlen);
|
||||
/** +1 is terminating byte */
|
||||
memcpy(newstr + match.rm_so + 1 + rlen, haystack + match.rm_so + 1 + nlen, hlen - (match.rm_so + 1) - nlen + 1);
|
||||
memcpy(newstr + match.rm_so + 1 + rlen, haystack + match.rm_so + 1 + nlen,
|
||||
hlen - (match.rm_so + 1) - nlen + 1);
|
||||
|
||||
regfree(&re);
|
||||
free(haystack);
|
||||
|
Reference in New Issue
Block a user