summaryrefslogtreecommitdiff
path: root/source4/lib/registry
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-13 22:46:09 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:56 +0100
commitd891c0c74a03d797aed1c5ac0329fd9d1d78da63 (patch)
tree65d0966014ca2bcded71ece2319a7723b03c4d3d /source4/lib/registry
parent8f687a5faeaf779e88c54bea4f886eb8f410d448 (diff)
downloadsamba-d891c0c74a03d797aed1c5ac0329fd9d1d78da63.tar.gz
samba-d891c0c74a03d797aed1c5ac0329fd9d1d78da63.tar.bz2
samba-d891c0c74a03d797aed1c5ac0329fd9d1d78da63.zip
r26429: Avoid use of global_smb_iconv_convenience.
(This used to be commit d37136b7abfbba75ef2e5ab855eb3382b9648b8c)
Diffstat (limited to 'source4/lib/registry')
-rw-r--r--source4/lib/registry/ldb.c4
-rw-r--r--source4/lib/registry/patchfile_preg.c3
-rw-r--r--source4/lib/registry/util.c5
3 files changed, 7 insertions, 5 deletions
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;