summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-05-30 13:40:33 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-05-31 00:32:07 +0200
commit8d639feed9493a099c57d494254f1ea262b28277 (patch)
tree8ab50e457b0cf60f65714fd7cd2573775e30658f /source3/param
parent381423b1bdba4c7d1931b162d872134c42e432cf (diff)
downloadsamba-8d639feed9493a099c57d494254f1ea262b28277.tar.gz
samba-8d639feed9493a099c57d494254f1ea262b28277.tar.bz2
samba-8d639feed9493a099c57d494254f1ea262b28277.zip
s3-param Move init_iconv() to loadparm.c
This assists with some dependency loops Andrew Bartlett
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c14
1 files changed, 14 insertions, 0 deletions
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) {