From d891c0c74a03d797aed1c5ac0329fd9d1d78da63 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 13 Dec 2007 22:46:09 +0100 Subject: r26429: Avoid use of global_smb_iconv_convenience. (This used to be commit d37136b7abfbba75ef2e5ab855eb3382b9648b8c) --- source4/lib/registry/ldb.c | 4 ++-- source4/lib/registry/patchfile_preg.c | 3 ++- source4/lib/registry/util.c | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'source4/lib/registry') diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c index 0e556da9e2..11fa066a35 100644 --- a/source4/lib/registry/ldb.c +++ b/source4/lib/registry/ldb.c @@ -54,7 +54,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx, struct ldb_message *msg, { case REG_SZ: case REG_EXPAND_SZ: - data->length = convert_string_talloc(mem_ctx, global_smb_iconv_convenience, CH_UTF8, CH_UTF16, + data->length = convert_string_talloc(mem_ctx, lp_iconv_convenience(global_loadparm), CH_UTF8, CH_UTF16, val->data, val->length, (void **)&data->data); break; @@ -85,7 +85,7 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx, switch (type) { case REG_SZ: case REG_EXPAND_SZ: - val.length = convert_string_talloc(mem_ctx, global_smb_iconv_convenience, CH_UTF16, CH_UNIX, + val.length = convert_string_talloc(mem_ctx, lp_iconv_convenience(global_loadparm), CH_UTF16, CH_UNIX, (void *)data.data, data.length, (void **)&val.data); diff --git a/source4/lib/registry/patchfile_preg.c b/source4/lib/registry/patchfile_preg.c index 47bd160c54..9cc9a5dec2 100644 --- a/source4/lib/registry/patchfile_preg.c +++ b/source4/lib/registry/patchfile_preg.c @@ -23,6 +23,7 @@ #include "lib/registry/registry.h" #include "lib/registry/patchfile.h" #include "system/filesys.h" +#include "param/param.h" struct preg_data { int fd; @@ -35,7 +36,7 @@ static WERROR preg_read_utf16(int fd, char *c) if (read(fd, &v, 2) < 2) { return WERR_GENERAL_FAILURE; } - push_codepoint(global_smb_iconv_convenience, c, v); + push_codepoint(lp_iconv_convenience(global_loadparm), c, v); return WERR_OK; } diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c index f75fc835b5..a251ae49a5 100644 --- a/source4/lib/registry/util.c +++ b/source4/lib/registry/util.c @@ -20,6 +20,7 @@ #include "includes.h" #include "lib/registry/registry.h" #include "librpc/gen_ndr/winreg.h" +#include "param/param.h" /** * @file @@ -61,7 +62,7 @@ _PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx, uint32_t type, switch (type) { case REG_EXPAND_SZ: case REG_SZ: - convert_string_talloc(mem_ctx, global_smb_iconv_convenience, CH_UTF16, CH_UNIX, + convert_string_talloc(mem_ctx, lp_iconv_convenience(global_loadparm), CH_UTF16, CH_UNIX, data.data, data.length, (void **)&ret); return ret; @@ -117,7 +118,7 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx, const char *type_str, { case REG_SZ: case REG_EXPAND_SZ: - data->length = convert_string_talloc(mem_ctx, global_smb_iconv_convenience, CH_UNIX, CH_UTF16, + data->length = convert_string_talloc(mem_ctx, lp_iconv_convenience(global_loadparm), CH_UNIX, CH_UTF16, data_str, strlen(data_str), (void **)&data->data); break; -- cgit