Merge branch 'master' into subtable

This commit is contained in:
lazio579 2019-01-23 17:00:10 +08:00
commit ffe2d8edc6
4 changed files with 7 additions and 5 deletions

View File

@ -939,7 +939,6 @@ network_mysqld_admin_plugin_apply_config(chassis *chas,
if (config->deny_ip) {
cetus_acl_add_rules(chas->priv->acl, ACL_BLACKLIST, config->deny_ip);
}
con = network_mysqld_con_new();
con->config = config;
network_mysqld_add_connection(chas, con, TRUE);

View File

@ -66,7 +66,7 @@ cetus_write_channel(int s, cetus_channel_t *ch, size_t size)
return NETWORK_SOCKET_WAIT_FOR_EVENT;
}
g_critical("%s:sendmsg() failed, err:%s", G_STRLOC, strerror(errno));
g_critical("%s:sendmsg() failed, err:%s", G_STRLOC, strerror(err));
return NETWORK_SOCKET_ERROR;
}
@ -105,11 +105,11 @@ cetus_read_channel(int s, cetus_channel_t *ch, size_t size)
if (n == -1) {
int err = errno;
if (err == EAGAIN) {
g_debug("%s:recvmsg() EAGAIN, errno:%d", G_STRLOC, errno);
g_debug("%s:recvmsg() EAGAIN, errno:%d", G_STRLOC, err);
return NETWORK_SOCKET_WAIT_FOR_EVENT;
}
g_critical("%s:recvmsg() failed, err:%s", G_STRLOC, strerror(errno));
g_critical("%s:recvmsg() failed, err:%s", G_STRLOC, strerror(err));
return NETWORK_SOCKET_ERROR;
}

View File

@ -4717,6 +4717,9 @@ accept_new_conns(chassis *chas, const gboolean do_accept)
GList *l;
for (l = chas->priv->listen_conns; l; l = l->next) {
network_mysqld_con *con = l->data;
if (con->server == NULL) {
continue;
}
if (do_accept) {
update_accept_event(con, EV_READ | EV_PERSIST);
if (listen(con->server->fd, 128) != 0) {

View File

@ -728,7 +728,7 @@ network_socket_write_writev(network_socket *con, int send_chunks)
/** remote side closed the connection */
return NETWORK_SOCKET_ERROR;
default:
g_message("%s: writev(%s, ...) failed: %s", G_STRLOC, con->dst->name->str, g_strerror(errno));
g_message("%s: writev(%s, ...) failed: %s", G_STRLOC, con->dst->name->str, g_strerror(os_errno));
return NETWORK_SOCKET_ERROR;
}
} else if (len == 0) {