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);
}
}