winbindd: shorten client list scan
authorUri Simchoni <urisimchoni@gmail.com>
Mon, 13 Jul 2015 18:42:57 +0000 (21:42 +0300)
committerJeremy Allison <jra@samba.org>
Wed, 15 Jul 2015 23:45:19 +0000 (01:45 +0200)
commit2c1c567ee1a59fa7bf09be0ed0554d2dc01cd0b9
tree888760bcd73baaa6810f6cd1cfd86cf810cf158d
parentc10e24e1c77a7ec1e020e2b61900eff05daffa29
winbindd: shorten client list scan

Counting on the client list being sorted by last access time,
the list scan for removing timed-out clients is shortened - once
the list is scanned oldest to newest, and once a non-timed-out
client is found, the scan can stop.

Also, finding the oldest idle client for removing an idle client
is simplified - oldest idle client is last idle client.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11397

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jul 16 01:45:20 CEST 2015 on sn-devel-104
source3/winbindd/winbindd.c