From 39ee38d9c1aabf4db065b433d067d0da053d7d61 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 6 Dec 2007 17:52:23 +0100 Subject: r26316: Use contexts for conversion functions. (This used to be commit f6420d933b5b011d428974f3a2a57edf19e6f482) --- source4/ntvfs/posix/pvfs_rename.c | 8 ++++---- source4/ntvfs/posix/pvfs_resolve.c | 6 +++--- source4/ntvfs/posix/pvfs_shortname.c | 2 +- source4/ntvfs/posix/pvfs_util.c | 2 +- source4/ntvfs/print/vfs_print.c | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'source4/ntvfs') diff --git a/source4/ntvfs/posix/pvfs_rename.c b/source4/ntvfs/posix/pvfs_rename.c index 3aa63bd2ca..5c351b2df2 100644 --- a/source4/ntvfs/posix/pvfs_rename.c +++ b/source4/ntvfs/posix/pvfs_rename.c @@ -107,16 +107,16 @@ static const char *pvfs_resolve_wildcard_component(TALLOC_CTX *mem_ctx, while (*p2) { codepoint_t c1, c2; size_t c_size1, c_size2; - c1 = next_codepoint(p1, &c_size1); - c2 = next_codepoint(p2, &c_size2); + c1 = next_codepoint(global_smb_iconv_convenience, p1, &c_size1); + c2 = next_codepoint(global_smb_iconv_convenience, p2, &c_size2); if (c2 == '?') { - d += push_codepoint(d, c1); + d += push_codepoint(global_smb_iconv_convenience, d, c1); } else if (c2 == '*') { memcpy(d, p1, strlen(p1)); d += strlen(p1); break; } else { - d += push_codepoint(d, c2); + d += push_codepoint(global_smb_iconv_convenience, d, c2); } p1 += c_size1; diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c index 8a7aa13351..f1d701b343 100644 --- a/source4/ntvfs/posix/pvfs_resolve.c +++ b/source4/ntvfs/posix/pvfs_resolve.c @@ -256,7 +256,7 @@ static NTSTATUS pvfs_unix_path(struct pvfs_state *pvfs, const char *cifs_name, while (*p) { size_t c_size; - codepoint_t c = next_codepoint(p, &c_size); + codepoint_t c = next_codepoint(global_smb_iconv_convenience, p, &c_size); switch (c) { case '\\': if (name->has_wildcard) { @@ -340,7 +340,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx, const char **fname, uint_t if (s == NULL) return NT_STATUS_NO_MEMORY; for (num_components=1, p=s; *p; p += c_size) { - c = next_codepoint(p, &c_size); + c = next_codepoint(global_smb_iconv_convenience, p, &c_size); if (c == '\\') num_components++; } @@ -352,7 +352,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx, const char **fname, uint_t components[0] = s; for (i=0, p=s; *p; p += c_size) { - c = next_codepoint(p, &c_size); + c = next_codepoint(global_smb_iconv_convenience, p, &c_size); if (c == '\\') { *p = 0; components[++i] = p+1; diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c index 1cbe287a4b..e671804ca6 100644 --- a/source4/ntvfs/posix/pvfs_shortname.c +++ b/source4/ntvfs/posix/pvfs_shortname.c @@ -388,7 +388,7 @@ static bool is_legal_name(struct pvfs_mangle_context *ctx, const char *name) { while (*name) { size_t c_size; - codepoint_t c = next_codepoint(name, &c_size); + codepoint_t c = next_codepoint(global_smb_iconv_convenience, name, &c_size); if (c == INVALID_CODEPOINT) { return false; } diff --git a/source4/ntvfs/posix/pvfs_util.c b/source4/ntvfs/posix/pvfs_util.c index fd9724f7e2..b7cba00d9b 100644 --- a/source4/ntvfs/posix/pvfs_util.c +++ b/source4/ntvfs/posix/pvfs_util.c @@ -181,7 +181,7 @@ uint32_t pvfs_name_hash(const char *key, size_t length) while (*key && length--) { size_t c_size; - codepoint_t c = next_codepoint(key, &c_size); + codepoint_t c = next_codepoint(global_smb_iconv_convenience, key, &c_size); c = toupper_w(c); value *= fnv1_prime; value ^= (uint32_t)c; diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index f9d3235116..baa1d876d6 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -83,8 +83,8 @@ static NTSTATUS print_ioctl(struct ntvfs_module_context *ntvfs, p = (char *)io->ioctl.out.blob.data; SSVAL(p,0, 1 /* REWRITE: fsp->rap_print_jobid */); - push_string(p+2, lp_netbios_name(global_loadparm), 15, STR_TERMINATE|STR_ASCII); - push_string(p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII); + push_string(global_smb_iconv_convenience, p+2, lp_netbios_name(global_loadparm), 15, STR_TERMINATE|STR_ASCII); + push_string(global_smb_iconv_convenience, p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII); return NT_STATUS_OK; } -- cgit