Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jchapma committed Feb 7, 2024
1 parent 4c51c1c commit 830fbba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions dirsrvtests/tests/suites/resource_limits/fdlimits_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ def test_reserve_descriptors_high(topology_st):
:expectedresults:
1. Success
2. Value of SYSTEMD_LIMIT is returned
2. Success
3. Values of SYSTEMD_LIMIT -2 is returned
4. Instance starts correctly
3. Success
4. Values of SYSTEMD_LIMIT -2 is returned
5. Instance starts correctly
"""

# Set nsslapd-maxdescriptors to a custom value
Expand Down
3 changes: 2 additions & 1 deletion ldap/servers/slapd/conntable.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ connection_table_new(int table_size)
ct->list_num = config_get_num_listeners();
ct->num_active = (int *)slapi_ch_calloc(1, ct->list_num * sizeof(int));
ct->size = table_size - (table_size % ct->list_num);
ct->list_size = ct->size/ct->list_num;
/* Account for first slot of each list being used as head (c_next). */
ct->list_size = (ct->size/ct->list_num)+1;
ct->c = (Connection **)slapi_ch_calloc(1, ct->size * sizeof(Connection *));
ct->fd = (struct POLL_STRUCT **)slapi_ch_calloc(1, ct->list_num * sizeof(struct POLL_STRUCT*));
ct->table_mutex = PR_NewLock();
Expand Down
2 changes: 1 addition & 1 deletion ldap/servers/slapd/daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ accept_thread(void *vports)

while (!g_get_shutdown()) {
/* Do we need to accept new connections? */
int accept_new_connections = (ct->size > g_get_current_conn_count());
int accept_new_connections = (ct->size > ct->conn_next_offset);
if (!accept_new_connections) {
if (last_accept_new_connections) {
slapi_log_err(SLAPI_LOG_ERR, "accept_thread",
Expand Down

0 comments on commit 830fbba

Please sign in to comment.