summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_shortname.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-25 12:58:09 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-25 12:58:09 +0100
commit584c4a518f4d18452b6515db132e4f75fba733a1 (patch)
treebbe367f36f092f233d7aefb61d75d5d1e1e85031 /source4/ntvfs/posix/pvfs_shortname.c
parent03ab8f9d79f2a06b357b2f5d392ea8b5be263c5e (diff)
parent71943b209b181e1e4a65ab477b83780add7051ae (diff)
downloadsamba-584c4a518f4d18452b6515db132e4f75fba733a1.tar.gz
samba-584c4a518f4d18452b6515db132e4f75fba733a1.tar.bz2
samba-584c4a518f4d18452b6515db132e4f75fba733a1.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts: source/build/smb_build/header.pm source/build/smb_build/makefile.pm source/lib/ldb/include/ldb_private.h (This used to be commit 1a646af0647f021d99473a8991c35e616a423ea6)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_shortname.c')
-rw-r--r--source4/ntvfs/posix/pvfs_shortname.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c
index 083a281819..923887debd 100644
--- a/source4/ntvfs/posix/pvfs_shortname.c
+++ b/source4/ntvfs/posix/pvfs_shortname.c
@@ -104,6 +104,8 @@ struct pvfs_mangle_context {
/* this is used to reverse the base 36 mapping */
unsigned char base_reverse[256];
+
+ struct smb_iconv_convenience *iconv_convenience;
};
@@ -388,7 +390,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(lp_iconv_convenience(global_loadparm), name, &c_size);
+ codepoint_t c = next_codepoint(ctx->iconv_convenience, name, &c_size);
if (c == INVALID_CODEPOINT) {
return false;
}
@@ -613,6 +615,8 @@ NTSTATUS pvfs_mangle_init(struct pvfs_state *pvfs)
return NT_STATUS_NO_MEMORY;
}
+ ctx->iconv_convenience = lp_iconv_convenience(pvfs->ntvfs->ctx->lp_ctx);
+
/* by default have a max of 512 entries in the cache. */
ctx->cache_size = lp_parm_int(pvfs->ntvfs->ctx->lp_ctx, NULL, "mangle", "cachesize", 512);