A connection is idle when both struct winbindd_cli_state->request AND
struct winbindd_cli_state->response are NULL. Otherwise we can flag
as idle a connection in the state of having sent the request to
the winbindd child (request != NULL) but not yet received a reply
(response == NULL).
int nidle = 0;
for (state = winbindd_client_list(); state; state = state->next) {
- if (state->response == NULL &&
+ if (state->request == NULL &&
+ state->response == NULL &&
!state->pwent_state && !state->grent_state) {
nidle++;
if (!last_access || state->last_access < last_access) {