From 352b5c18579c9610c15e5c24e012e60cd972b95a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 3 Jul 2008 16:24:27 +0200 Subject: Remove gencache_[un]lock_entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Günther agreed that it might be unnecessary in dsgetdcname_cache_store() :-) (This used to be commit 7a5a575ffe5196caecedc93970a25abfbe6f8059) --- source3/libsmb/dsgetdcname.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c index 2a445cbd5a..afc87030d0 100644 --- a/source3/libsmb/dsgetdcname.c +++ b/source3/libsmb/dsgetdcname.c @@ -159,7 +159,6 @@ static NTSTATUS dsgetdcname_cache_store(TALLOC_CTX *mem_ctx, { time_t expire_time; char *key; - bool ret = false; if (!gencache_init()) { return NT_STATUS_INTERNAL_DB_ERROR; @@ -172,15 +171,8 @@ static NTSTATUS dsgetdcname_cache_store(TALLOC_CTX *mem_ctx, expire_time = time(NULL) + DSGETDCNAME_CACHE_TTL; - if (gencache_lock_entry(key) != 0) { - return NT_STATUS_LOCK_NOT_GRANTED; - } - - ret = gencache_set_data_blob(key, blob, expire_time); - - gencache_unlock_entry(key); - - return ret ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; + return gencache_set_data_blob(key, blob, expire_time) + ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } /**************************************************************** -- cgit