Code cleanup
Code cleanup
This commit is contained in:
@ -34,6 +34,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <gw.h>
|
||||||
#include "mysql_client_server_protocol.h"
|
#include "mysql_client_server_protocol.h"
|
||||||
#include <skygw_types.h>
|
#include <skygw_types.h>
|
||||||
#include <skygw_utils.h>
|
#include <skygw_utils.h>
|
||||||
@ -741,6 +742,7 @@ int gw_do_connect_to_backend(
|
|||||||
struct sockaddr_in serv_addr;
|
struct sockaddr_in serv_addr;
|
||||||
int rv;
|
int rv;
|
||||||
int so = 0;
|
int so = 0;
|
||||||
|
int bufsize;
|
||||||
|
|
||||||
memset(&serv_addr, 0, sizeof serv_addr);
|
memset(&serv_addr, 0, sizeof serv_addr);
|
||||||
serv_addr.sin_family = AF_INET;
|
serv_addr.sin_family = AF_INET;
|
||||||
@ -764,6 +766,10 @@ int gw_do_connect_to_backend(
|
|||||||
/* prepare for connect */
|
/* prepare for connect */
|
||||||
setipaddress(&serv_addr.sin_addr, host);
|
setipaddress(&serv_addr.sin_addr, host);
|
||||||
serv_addr.sin_port = htons(port);
|
serv_addr.sin_port = htons(port);
|
||||||
|
bufsize = GW_CLIENT_SO_SNDBUF;
|
||||||
|
setsockopt(so, SOL_SOCKET, SO_SNDBUF, &bufsize, sizeof(bufsize));
|
||||||
|
bufsize = GW_CLIENT_SO_RCVBUF;
|
||||||
|
setsockopt(so, SOL_SOCKET, SO_RCVBUF, &bufsize, sizeof(bufsize));
|
||||||
/* set socket to as non-blocking here */
|
/* set socket to as non-blocking here */
|
||||||
setnonblocking(so);
|
setnonblocking(so);
|
||||||
rv = connect(so, (struct sockaddr *)&serv_addr, sizeof(serv_addr));
|
rv = connect(so, (struct sockaddr *)&serv_addr, sizeof(serv_addr));
|
||||||
@ -1387,9 +1393,9 @@ int gw_find_mysql_user_password_sha1(char *username, uint8_t *gateway_password,
|
|||||||
|
|
||||||
memset(&key.ipv4, 0, sizeof(struct sockaddr_in));
|
memset(&key.ipv4, 0, sizeof(struct sockaddr_in));
|
||||||
|
|
||||||
LOGIF(LE,
|
LOGIF(LD,
|
||||||
(skygw_log_write_flush(
|
(skygw_log_write_flush(
|
||||||
LOGFILE_ERROR,
|
LOGFILE_DEBUG,
|
||||||
"%lu [MySQL Client Auth], checking user [%s@%s] with wildcard host [%%]",
|
"%lu [MySQL Client Auth], checking user [%s@%s] with wildcard host [%%]",
|
||||||
pthread_self(),
|
pthread_self(),
|
||||||
key.user,
|
key.user,
|
||||||
|
|||||||
Reference in New Issue
Block a user