From 3eda2815f648fdb688f9bace4c45870c7a427dfc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Jacke?= Date: Fri, 10 Sep 2010 20:46:10 +0200 Subject: [PATCH] s4/pvfs: use monotonic time for this timeout --- source4/ntvfs/posix/pvfs_search.c | 6 +++--- source4/ntvfs/posix/vfs_posix.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c index e6b53ee623b..a050de1ec38 100644 --- a/source4/ntvfs/posix/pvfs_search.c +++ b/source4/ntvfs/posix/pvfs_search.c @@ -291,7 +291,7 @@ static NTSTATUS pvfs_search_fill(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, static void pvfs_search_cleanup(struct pvfs_state *pvfs) { int i; - time_t t = time(NULL); + time_t t = time_mono(NULL); for (i=0;icurrent_index = 0; search->search_attrib = search_attrib & 0xFF; search->must_attrib = (search_attrib>>8) & 0xFF; - search->last_used = time(NULL); + search->last_used = time_mono(NULL); search->te = NULL; DLIST_ADD(pvfs->search.list, search); @@ -437,7 +437,7 @@ static NTSTATUS pvfs_search_next_old(struct ntvfs_module_context *ntvfs, if (!NT_STATUS_IS_OK(status)) { return status; } - search->last_used = time(NULL); + search->last_used = time_mono(NULL); status = pvfs_search_fill(pvfs, req, max_count, search, io->generic.data_level, &reply_count, search_private, callback); diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h index 70e4c90d7a7..d60369df501 100644 --- a/source4/ntvfs/posix/vfs_posix.h +++ b/source4/ntvfs/posix/vfs_posix.h @@ -224,7 +224,7 @@ struct pvfs_search_state { uint16_t search_attrib; uint16_t must_attrib; struct pvfs_dir *dir; - time_t last_used; + time_t last_used; /* monotonic clock time */ unsigned int num_ea_names; struct ea_name *ea_names; struct tevent_timer *te; -- 2.11.4.GIT