Complete merge of latest develop branch
This commit is contained in:
@ -302,8 +302,6 @@ static int find_last_seqno(strpart_t* parts, int seqno, int seqnoidx);
|
|||||||
void flushall_logfiles(bool flush);
|
void flushall_logfiles(bool flush);
|
||||||
bool thr_flushall_check();
|
bool thr_flushall_check();
|
||||||
|
|
||||||
#include "../core/atomic.c"
|
|
||||||
|
|
||||||
const char* get_suffix_default(void)
|
const char* get_suffix_default(void)
|
||||||
{
|
{
|
||||||
return ".log";
|
return ".log";
|
||||||
|
|||||||
@ -1175,7 +1175,7 @@ config_get_value(CONFIG_PARAMETER *params, const char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the value of a config parameter
|
* Get the value of a config parameter as a string
|
||||||
*
|
*
|
||||||
* @param params The linked list of config parameters
|
* @param params The linked list of config parameters
|
||||||
* @param name The parameter to return
|
* @param name The parameter to return
|
||||||
|
|||||||
1004
server/core/dcb.c
1004
server/core/dcb.c
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,7 @@
|
|||||||
* 30/08/14 Massimiliano Pinto Addition of new service status description
|
* 30/08/14 Massimiliano Pinto Addition of new service status description
|
||||||
* 30/10/14 Massimiliano Pinto Addition of SERVER_MASTER_STICKINESS description
|
* 30/10/14 Massimiliano Pinto Addition of SERVER_MASTER_STICKINESS description
|
||||||
* 01/06/15 Massimiliano Pinto Addition of server_update_address/port
|
* 01/06/15 Massimiliano Pinto Addition of server_update_address/port
|
||||||
*
|
* 19/06/15 Martin Brampton Extra code for persistent connections
|
||||||
* @endverbatim
|
* @endverbatim
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@ -36,7 +36,8 @@
|
|||||||
* 06/02/15 Mark Riddoch Added caching of authentication data
|
* 06/02/15 Mark Riddoch Added caching of authentication data
|
||||||
* 18/02/15 Mark Riddoch Added result set management
|
* 18/02/15 Mark Riddoch Added result set management
|
||||||
* 03/03/15 Massimiliano Pinto Added config_enable_feedback_task() call in serviceStartAll
|
* 03/03/15 Massimiliano Pinto Added config_enable_feedback_task() call in serviceStartAll
|
||||||
*
|
* 19/06/15 Martin Brampton More meaningful names for temp variables
|
||||||
|
|
||||||
* @endverbatim
|
* @endverbatim
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@ -58,15 +58,16 @@ struct service;
|
|||||||
* 08/05/2014 Mark Riddoch Addition of writeq high and low watermarks
|
* 08/05/2014 Mark Riddoch Addition of writeq high and low watermarks
|
||||||
* 27/08/2014 Mark Riddoch Addition of write event queuing
|
* 27/08/2014 Mark Riddoch Addition of write event queuing
|
||||||
* 23/09/2014 Mark Riddoch New poll processing queue
|
* 23/09/2014 Mark Riddoch New poll processing queue
|
||||||
|
* 19/06/2015 Martin Brampton Provision of persistent connections
|
||||||
*
|
*
|
||||||
* @endverbatim
|
* @endverbatim
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct dcb;
|
struct dcb;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @verbatim
|
* @verbatim
|
||||||
* The operations that can be performed on the descriptor
|
* The operations that can be performed on the descriptor
|
||||||
*
|
*
|
||||||
* read EPOLLIN handler for the socket
|
* read EPOLLIN handler for the socket
|
||||||
* write MaxScale data write entry point
|
* write MaxScale data write entry point
|
||||||
@ -80,7 +81,7 @@ struct dcb;
|
|||||||
* close MaxScale close entry point for the socket
|
* close MaxScale close entry point for the socket
|
||||||
* listen Create a listener for the protocol
|
* listen Create a listener for the protocol
|
||||||
* auth Authentication entry point
|
* auth Authentication entry point
|
||||||
* session Session handling entry point
|
* session Session handling entry point
|
||||||
* @endverbatim
|
* @endverbatim
|
||||||
*
|
*
|
||||||
* This forms the "module object" for protocol modules within the gateway.
|
* This forms the "module object" for protocol modules within the gateway.
|
||||||
@ -224,10 +225,10 @@ typedef struct dcb_callback {
|
|||||||
* gateway may be selected to execute the required actions when a network event occurs.
|
* gateway may be selected to execute the required actions when a network event occurs.
|
||||||
*/
|
*/
|
||||||
typedef struct dcb {
|
typedef struct dcb {
|
||||||
skygw_chk_t dcb_chk_top;
|
skygw_chk_t dcb_chk_top;
|
||||||
bool dcb_errhandle_called; /*< this can be called only once */
|
bool dcb_errhandle_called; /*< this can be called only once */
|
||||||
dcb_role_t dcb_role;
|
dcb_role_t dcb_role;
|
||||||
SPINLOCK dcb_initlock;
|
SPINLOCK dcb_initlock;
|
||||||
DCBEVENTQ evq; /**< The event queue for this DCB */
|
DCBEVENTQ evq; /**< The event queue for this DCB */
|
||||||
int fd; /**< The descriptor */
|
int fd; /**< The descriptor */
|
||||||
dcb_state_t state; /**< Current descriptor state */
|
dcb_state_t state; /**< Current descriptor state */
|
||||||
@ -235,7 +236,7 @@ typedef struct dcb {
|
|||||||
char *remote; /**< Address of remote end */
|
char *remote; /**< Address of remote end */
|
||||||
char *user; /**< User name for connection */
|
char *user; /**< User name for connection */
|
||||||
struct sockaddr_in ipv4; /**< remote end IPv4 address */
|
struct sockaddr_in ipv4; /**< remote end IPv4 address */
|
||||||
char *protoname; /**< Name of the protocol */
|
char *protoname; /**< Name of the protocol */
|
||||||
void *protocol; /**< The protocol specific state */
|
void *protocol; /**< The protocol specific state */
|
||||||
struct session *session; /**< The owning session */
|
struct session *session; /**< The owning session */
|
||||||
GWPROTOCOL func; /**< The functions for this descriptor */
|
GWPROTOCOL func; /**< The functions for this descriptor */
|
||||||
@ -249,10 +250,10 @@ typedef struct dcb {
|
|||||||
SPINLOCK authlock; /**< Generic Authorization spinlock */
|
SPINLOCK authlock; /**< Generic Authorization spinlock */
|
||||||
|
|
||||||
DCBSTATS stats; /**< DCB related statistics */
|
DCBSTATS stats; /**< DCB related statistics */
|
||||||
unsigned int dcb_server_status; /*< the server role indicator from SERVER */
|
unsigned int dcb_server_status; /*< the server role indicator from SERVER */
|
||||||
struct dcb *next; /**< Next DCB in the chain of allocated DCB's */
|
struct dcb *next; /**< Next DCB in the chain of allocated DCB's */
|
||||||
struct dcb *nextpersistent; /**< Next DCB in the persistent pool for SERVER */
|
struct dcb *nextpersistent; /**< Next DCB in the persistent pool for SERVER */
|
||||||
time_t persistentstart; /**< Time when DCB placed in persistent pool */
|
time_t persistentstart; /**< Time when DCB placed in persistent pool */
|
||||||
struct service *service; /**< The related service */
|
struct service *service; /**< The related service */
|
||||||
void *data; /**< Specific client data */
|
void *data; /**< Specific client data */
|
||||||
DCBMM memdata; /**< The data related to DCB memory management */
|
DCBMM memdata; /**< The data related to DCB memory management */
|
||||||
@ -265,13 +266,13 @@ typedef struct dcb {
|
|||||||
SPINLOCK polloutlock;
|
SPINLOCK polloutlock;
|
||||||
int polloutbusy;
|
int polloutbusy;
|
||||||
int writecheck;
|
int writecheck;
|
||||||
unsigned long last_read; /*< Last time the DCB received data */
|
unsigned long last_read; /*< Last time the DCB received data */
|
||||||
unsigned int high_water; /**< High water mark */
|
unsigned int high_water; /**< High water mark */
|
||||||
unsigned int low_water; /**< Low water mark */
|
unsigned int low_water; /**< Low water mark */
|
||||||
struct server *server; /**< The associated backend server */
|
struct server *server; /**< The associated backend server */
|
||||||
SSL* ssl; /*< SSL struct for connection */
|
SSL* ssl; /*< SSL struct for connection */
|
||||||
int dcb_port; /**< port of target server */
|
int dcb_port; /**< port of target server */
|
||||||
skygw_chk_t dcb_chk_tail;
|
skygw_chk_t dcb_chk_tail;
|
||||||
} DCB;
|
} DCB;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -362,4 +363,4 @@ int dcb_drain_writeq_SSL(DCB *dcb);
|
|||||||
|
|
||||||
#define DCB_IS_CLONE(d) ((d)->flags & DCBF_CLONE)
|
#define DCB_IS_CLONE(d) ((d)->flags & DCBF_CLONE)
|
||||||
#define DCB_REPLIED(d) ((d)->flags & DCBF_REPLIED)
|
#define DCB_REPLIED(d) ((d)->flags & DCBF_REPLIED)
|
||||||
#endif /* _DCB_H *
|
#endif /* _DCB_H */
|
||||||
|
|||||||
@ -44,7 +44,8 @@
|
|||||||
* 27/10/14 Massimiliano Pinto Addition of SERVER_MASTER_STICKINESS
|
* 27/10/14 Massimiliano Pinto Addition of SERVER_MASTER_STICKINESS
|
||||||
* 19/02/15 Mark Riddoch Addition of serverGetList
|
* 19/02/15 Mark Riddoch Addition of serverGetList
|
||||||
* 01/06/15 Massimiliano Pinto Addition of server_update_address/port
|
* 01/06/15 Massimiliano Pinto Addition of server_update_address/port
|
||||||
*
|
* 19/06/15 Martin Brampton Extra fields for persistent connections, CHK_SERVER
|
||||||
|
|
||||||
* @endverbatim
|
* @endverbatim
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@ -72,7 +72,7 @@ static void backend_set_delayqueue(DCB *dcb, GWBUF *queue);
|
|||||||
static int gw_change_user(DCB *backend_dcb, SERVER *server, SESSION *in_session, GWBUF *queue);
|
static int gw_change_user(DCB *backend_dcb, SERVER *server, SESSION *in_session, GWBUF *queue);
|
||||||
static GWBUF* process_response_data (DCB* dcb, GWBUF* readbuf, int nbytes_to_process);
|
static GWBUF* process_response_data (DCB* dcb, GWBUF* readbuf, int nbytes_to_process);
|
||||||
extern char* create_auth_failed_msg( GWBUF* readbuf, char* hostaddr, uint8_t* sha1);
|
extern char* create_auth_failed_msg( GWBUF* readbuf, char* hostaddr, uint8_t* sha1);
|
||||||
extern char* create_auth_fail_str(char *username, char *hostaddr, char *sha1, char *db);
|
extern char* create_auth_fail_str(char *username, char *hostaddr, char *sha1, char *db, int errcode);
|
||||||
static bool sescmd_response_complete(DCB* dcb);
|
static bool sescmd_response_complete(DCB* dcb);
|
||||||
|
|
||||||
|
|
||||||
@ -1446,7 +1446,8 @@ static int gw_change_user(
|
|||||||
message = create_auth_fail_str(username,
|
message = create_auth_fail_str(username,
|
||||||
backend->session->client->remote,
|
backend->session->client->remote,
|
||||||
password_set,
|
password_set,
|
||||||
"");
|
"",
|
||||||
|
auth_ret);
|
||||||
if (message == NULL)
|
if (message == NULL)
|
||||||
{
|
{
|
||||||
LOGIF(LE, (skygw_log_write_flush(
|
LOGIF(LE, (skygw_log_write_flush(
|
||||||
|
|||||||
Reference in New Issue
Block a user