dcb.c
: dcb_alloc switched malloc to calloc, dcb->fd is initialized to -1. : dcb_process_zombies return value of close(fd) is checked. Closed fds are stored to conn_open array. : dcb_connect assigns new fd only if backend connection succeeds. Dcb is added to poll set in the same way, only if connect succeed. gateway.c : conn_open array is initialized in main. For each created socket, a true is set to corresponding slot. Max. number of slots is 1024. mysql_client_server_protocol.h : gw_do_connect_to declaration mysql_backend.c : gw_create_backend_connection returns rv >= 0 and a protocol which is assigned to backend_dcb. In error, -1 is returned and fd is not set. mysql_client.c : conn_open array is kept up-to-date and protocol pointer is assigned also to dcb outside mysql_protocol_init. mysql_common.c : gw_do_connect_to_backend 3rd argument is pointer to fd, not protocol. dcb is added to poll set later in dcb_connect. skygw_debug.h : define conn_open[1024] array where open connections can be marked in debug build.
This commit is contained in:
@ -210,6 +210,9 @@ void* log_flush_thr = NULL;
|
||||
ssize_t log_flush_timeout_ms = 0;
|
||||
int l;
|
||||
|
||||
#if defined(SS_DEBUG)
|
||||
memset(conn_open, 0, sizeof(bool)*1024);
|
||||
#endif
|
||||
l = atexit(skygw_logmanager_exit);
|
||||
|
||||
if (l != 0) {
|
||||
|
||||
Reference in New Issue
Block a user