summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-02-18 13:47:28 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-02-18 18:41:01 +1100
commit2a3a86a86f3d1ab97adda563beda7ee35f6a2414 (patch)
tree38b9f9b9818482cdfe6ecdb9ee797fe2f3531e7d /source4/param
parent5155a5f5c130ff5b71ce4e37877378a6967046b4 (diff)
downloadsamba-2a3a86a86f3d1ab97adda563beda7ee35f6a2414.tar.gz
samba-2a3a86a86f3d1ab97adda563beda7ee35f6a2414.tar.bz2
samba-2a3a86a86f3d1ab97adda563beda7ee35f6a2414.zip
lib/util/charcnv Move iconv handle setup in common
We now use the struct smb_iconv_convenience at the core of all our iconv code, and use global_iconv_convenience for the callers that don't specify one. Andrew Bartlett
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/loadparm.c6
-rw-r--r--source4/param/util.c1
2 files changed, 2 insertions, 5 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 3d87d6fb12..31157b2833 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -2776,11 +2776,7 @@ int lpcfg_maxprintjobs(struct loadparm_service *service, struct loadparm_service
struct smb_iconv_convenience *lpcfg_iconv_convenience(struct loadparm_context *lp_ctx)
{
if (lp_ctx == NULL) {
- static struct smb_iconv_convenience *fallback_ic = NULL;
- if (fallback_ic == NULL)
- fallback_ic = smb_iconv_convenience_reinit(talloc_autofree_context(),
- "CP850", "UTF8", true, NULL);
- return fallback_ic;
+ return get_iconv_convenience();
}
return lp_ctx->iconv_convenience;
}
diff --git a/source4/param/util.c b/source4/param/util.c
index fd12bb1eca..c6dca6076e 100644
--- a/source4/param/util.c
+++ b/source4/param/util.c
@@ -304,6 +304,7 @@ struct smb_iconv_convenience *smb_iconv_convenience_reinit_lp(TALLOC_CTX *mem_ct
{
return smb_iconv_convenience_reinit(mem_ctx, lpcfg_dos_charset(lp_ctx),
lpcfg_unix_charset(lp_ctx),
+ lpcfg_display_charset(lp_ctx),
lpcfg_parm_bool(lp_ctx, NULL, "iconv", "native", true),
old_ic);
}