Fix bug #7744 - "dfree cache time" doesn't work.
commitf1fa394584ca5297d281c8fe214aba2fe856d458
authorJeremy Allison <jra@samba.org>
Wed, 20 Oct 2010 20:58:15 +0000 (20 13:58 -0700)
committerKarolin Seeger <kseeger@samba.org>
Sat, 5 Mar 2011 13:34:33 +0000 (5 14:34 +0100)
treee1ed4a277a3c28441b3926665462acf9119708ef
parentd82d3346cf87dcce9f7d098bb975055e69473078
Fix bug #7744 - "dfree cache time" doesn't work.

There is a bug in processing the dfree cache time, which is associated with the
smbd idle timer. The idle timer call conn_idle_all(), which updates the
conn->lastused timestamp. The dfree cache time code in smbd/dfree.c depends on
conn->lastused being up to date to refresh the cached dfree value.

Unfortunately the conn_idle_all() returns early if any of the connection
structs is not idle, never updating any further conn->lastused timestamps. If
(as is common due to an IPC$ connection) there are more than one used
connection struct, then the conn->lastused timestamps after the IPC$ connection
in the connection list will never be updated.

Ensure we always update conn->lastused for all connections when calling
conn_idle_all().

Jeremy.
(cherry picked from commit 47841952936e28916a738105194d662207477285)
source3/smbd/conn.c