diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-13 12:19:33 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:49:53 +0100 |
commit | a5b8999f23d56b4a19b87fc17b22c96f88e487e8 (patch) | |
tree | 2cfc01d253b8d41ed95c7ac90dd6691e27d88681 /source4/lib | |
parent | aa32619c5c910b9f5989f44de21621db5ef7c357 (diff) | |
download | samba-a5b8999f23d56b4a19b87fc17b22c96f88e487e8.tar.gz samba-a5b8999f23d56b4a19b87fc17b22c96f88e487e8.tar.bz2 samba-a5b8999f23d56b4a19b87fc17b22c96f88e487e8.zip |
r26427: Avoid global_smb_iconv_convenience.
(This used to be commit bf072c6fb37b3e6a71c0c747b9fbeaa01480229e)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/charset/tests/iconv.c | 4 | ||||
-rw-r--r-- | source4/lib/registry/tests/generic.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/source4/lib/charset/tests/iconv.c b/source4/lib/charset/tests/iconv.c index ca13dc503a..d47390b814 100644 --- a/source4/lib/charset/tests/iconv.c +++ b/source4/lib/charset/tests/iconv.c @@ -288,7 +288,7 @@ static bool test_codepoint(struct torture_context *tctx, unsigned int codepoint) size_t size, size2; codepoint_t c; - size = push_codepoint(global_smb_iconv_convenience, (char *)buf, codepoint); + size = push_codepoint(lp_iconv_convenience(tctx->lp_ctx), (char *)buf, codepoint); torture_assert(tctx, size != -1 || (codepoint >= 0xd800 && codepoint <= 0x10000), "Invalid Codepoint range"); @@ -299,7 +299,7 @@ static bool test_codepoint(struct torture_context *tctx, unsigned int codepoint) buf[size+2] = random(); buf[size+3] = random(); - c = next_codepoint(global_smb_iconv_convenience, (char *)buf, &size2); + c = next_codepoint(lp_iconv_convenience(tctx->lp_ctx), (char *)buf, &size2); torture_assert(tctx, c == codepoint, talloc_asprintf(tctx, diff --git a/source4/lib/registry/tests/generic.c b/source4/lib/registry/tests/generic.c index 1acb6342e7..25a89793bd 100644 --- a/source4/lib/registry/tests/generic.c +++ b/source4/lib/registry/tests/generic.c @@ -23,6 +23,7 @@ #include "lib/registry/registry.h" #include "torture/torture.h" #include "librpc/gen_ndr/winreg.h" +#include "param/param.h" struct torture_suite *torture_registry_hive(TALLOC_CTX *mem_ctx); struct torture_suite *torture_registry_registry(TALLOC_CTX *mem_ctx); @@ -52,7 +53,7 @@ static bool test_reg_val_data_string_dword(struct torture_context *ctx) static bool test_reg_val_data_string_sz(struct torture_context *ctx) { DATA_BLOB db; - db.length = convert_string_talloc(ctx, global_smb_iconv_convenience, CH_UNIX, CH_UTF16, + db.length = convert_string_talloc(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UNIX, CH_UTF16, "bla", 3, (void **)&db.data); torture_assert_str_equal(ctx, "bla", reg_val_data_string(ctx, REG_SZ, db), @@ -87,7 +88,7 @@ static bool test_reg_val_data_string_empty(struct torture_context *ctx) static bool test_reg_val_description(struct torture_context *ctx) { DATA_BLOB data; - data.length = convert_string_talloc(ctx, global_smb_iconv_convenience, CH_UNIX, CH_UTF16, + data.length = convert_string_talloc(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UNIX, CH_UTF16, "stationary traveller", strlen("stationary traveller"), (void **)&data.data); @@ -101,7 +102,7 @@ static bool test_reg_val_description(struct torture_context *ctx) static bool test_reg_val_description_nullname(struct torture_context *ctx) { DATA_BLOB data; - data.length = convert_string_talloc(ctx, global_smb_iconv_convenience, CH_UNIX, CH_UTF16, + data.length = convert_string_talloc(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UNIX, CH_UTF16, "west berlin", strlen("west berlin"), (void **)&data.data); |