diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-06 17:52:23 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:48:30 +0100 |
commit | 39ee38d9c1aabf4db065b433d067d0da053d7d61 (patch) | |
tree | 5c827c09374873fe386c28ef51415d81a49c939a /source4/ntvfs | |
parent | b440ed3df31b11d520c6d744cf53c54165f61b7a (diff) | |
download | samba-39ee38d9c1aabf4db065b433d067d0da053d7d61.tar.gz samba-39ee38d9c1aabf4db065b433d067d0da053d7d61.tar.bz2 samba-39ee38d9c1aabf4db065b433d067d0da053d7d61.zip |
r26316: Use contexts for conversion functions.
(This used to be commit f6420d933b5b011d428974f3a2a57edf19e6f482)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/posix/pvfs_rename.c | 8 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_resolve.c | 6 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_shortname.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_util.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/print/vfs_print.c | 4 |
5 files changed, 11 insertions, 11 deletions
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; } |