From 3edcd55bf140d09833284ba5a0f04f86b04ef7dc Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 10 Jul 2009 12:24:56 +0200 Subject: Remove gencache_init/shutdown gencache_get/set/del/iterate call gencache_init() internally anyway. And we've been very lazy calling gencache_shutdown, so this seems not really required. --- source3/lib/gencache.c | 21 +-------------------- source3/lib/netapi/netapi.c | 1 - 2 files changed, 1 insertion(+), 21 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c index c94fb78541..06eb29345b 100644 --- a/source3/lib/gencache.c +++ b/source3/lib/gencache.c @@ -49,7 +49,7 @@ static struct tdb_context *cache; * false on failure **/ -bool gencache_init(void) +static bool gencache_init(void) { char* cache_fname = NULL; @@ -78,25 +78,6 @@ bool gencache_init(void) } -/** - * Cache shutdown function. Closes opened cache tdb file. - * - * @return true on successful closing the cache or - * false on failure during cache shutdown - **/ - -bool gencache_shutdown(void) -{ - int ret; - /* tdb_close routine returns -1 on error */ - if (!cache) return False; - DEBUG(5, ("Closing cache file\n")); - ret = tdb_close(cache); - cache = NULL; - return ret != -1; -} - - /** * Set an entry in the cache file. If there's no such * one, then add it. diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c index 2f8474b37f..e80879a1d2 100644 --- a/source3/lib/netapi/netapi.c +++ b/source3/lib/netapi/netapi.c @@ -170,7 +170,6 @@ NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx) gfree_charcnv(); gfree_interfaces(); - gencache_shutdown(); secrets_shutdown(); TALLOC_FREE(ctx); -- cgit