1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

winbind: Slightly simplify remove_timed_out_clients

Best reviewed with "git show -b"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2017-03-09 17:50:01 +01:00 committed by Jeremy Allison
parent 5eacb88831
commit e4173fbc53

View File

@ -1125,24 +1125,25 @@ static void remove_timed_out_clients(void)
prev = winbindd_client_list_prev(state);
expiry_time = state->last_access + timeout_val;
if (curr_time > expiry_time) {
if (client_is_idle(state)) {
DEBUG(5,("Idle client timed out, "
"shutting down sock %d, pid %u\n",
state->sock,
(unsigned int)state->pid));
} else {
DEBUG(5,("Client request timed out, "
"shutting down sock %d, pid %u\n",
state->sock,
(unsigned int)state->pid));
}
remove_client(state);
} else {
if (curr_time <= expiry_time) {
/* list is sorted, previous clients in
list are newer */
break;
}
if (client_is_idle(state)) {
DEBUG(5,("Idle client timed out, "
"shutting down sock %d, pid %u\n",
state->sock,
(unsigned int)state->pid));
} else {
DEBUG(5,("Client request timed out, "
"shutting down sock %d, pid %u\n",
state->sock,
(unsigned int)state->pid));
}
remove_client(state);
}
}