From 8d639feed9493a099c57d494254f1ea262b28277 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 30 May 2011 13:40:33 +1000 Subject: s3-param Move init_iconv() to loadparm.c This assists with some dependency loops Andrew Bartlett --- source3/include/proto.h | 1 - source3/lib/charcnv.c | 14 -------------- source3/param/loadparm.c | 14 ++++++++++++++ 3 files changed, 14 insertions(+), 15 deletions(-) (limited to 'source3') diff --git a/source3/include/proto.h b/source3/include/proto.h index ba9497e6ca..c17377cd2f 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -73,7 +73,6 @@ int bitmap_find(struct bitmap *bm, unsigned ofs); /* The following definitions come from lib/charcnv.c */ void gfree_charcnv(void); -void init_iconv(void); bool convert_string(charset_t from, charset_t to, void const *src, size_t srclen, void *dest, size_t destlen, diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index 765e3943ef..1e44b81af9 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -30,20 +30,6 @@ void gfree_charcnv(void) TALLOC_FREE(global_iconv_handle); } -/** - * Initialize iconv conversion descriptors. - * - * This is called the first time it is needed, and also called again - * every time the configuration is reloaded, because the charset or - * codepage might have changed. - **/ -void init_iconv(void) -{ - global_iconv_handle = smb_iconv_handle_reinit(NULL, lp_dos_charset(), - lp_unix_charset(), lp_display_charset(), - true, global_iconv_handle); -} - /** * Copy a string from a char* unix src to a dos codepage string destination. * diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 2ee5988336..08597adf2a 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -7523,6 +7523,20 @@ static bool handle_netbios_name(int snum, const char *pszParmValue, char **ptr) return ret; } +/** + * Initialize iconv conversion descriptors. + * + * This is called the first time it is needed, and also called again + * every time the configuration is reloaded, because the charset or + * codepage might have changed. + **/ +static void init_iconv(void) +{ + global_iconv_handle = smb_iconv_handle_reinit(NULL, lp_dos_charset(), + lp_unix_charset(), lp_display_charset(), + true, global_iconv_handle); +} + static bool handle_charset(int snum, const char *pszParmValue, char **ptr) { if (strcmp(*ptr, pszParmValue) != 0) { -- cgit