From 79e6fea77443099a6ebe4a2e3bbf606cd444341d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 12 Apr 2011 14:36:17 +1000 Subject: lib/util/charset create _handle functions for convert_string() et al This is now API compatible with the existing code in lib/util/charset lazy_initialize_conv() is no longer called as init_iconv() is called when the smb.conf is processed, and get_conv_handle() will auto-init with defaults if required. load_case_tables_library() is no longer requried as all binaries and libraries already load these in their entry points, as otherwise all the other string functions would fail. Andrew Bartlett --- source3/include/proto.h | 1 - source3/lib/charcnv.c | 12 ------------ 2 files changed, 13 deletions(-) (limited to 'source3') diff --git a/source3/include/proto.h b/source3/include/proto.h index 2b6e168248..d4ab13d497 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -72,7 +72,6 @@ int bitmap_find(struct bitmap *bm, unsigned ofs); /* The following definitions come from lib/charcnv.c */ -void lazy_initialize_conv(void); void gfree_charcnv(void); void init_iconv(void); bool convert_string(charset_t from, charset_t to, diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index bde6510314..f6fed8d1ec 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -22,24 +22,12 @@ */ #include "includes.h" -static bool initialized; - -void lazy_initialize_conv(void) -{ - if (!initialized) { - load_case_tables_library(); - init_iconv(); - initialized = true; - } -} - /** * Destroy global objects allocated by init_iconv() **/ void gfree_charcnv(void) { TALLOC_FREE(global_iconv_handle); - initialized = false; } /** -- cgit