summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-24 16:00:43 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-24 16:00:43 +0200
commitc3415b3e57717cfb96b9df7caa1a27fbc26bde21 (patch)
tree4217157469cf5162c97c515e0288b963cf457437 /source4/ntvfs/posix
parent264277b555a7bd9d2308ef6ec24ecef77fa1d401 (diff)
downloadsamba-c3415b3e57717cfb96b9df7caa1a27fbc26bde21.tar.gz
samba-c3415b3e57717cfb96b9df7caa1a27fbc26bde21.tar.bz2
samba-c3415b3e57717cfb96b9df7caa1a27fbc26bde21.zip
Add version of next_codepoint without iconv_convenience.
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r--source4/ntvfs/posix/pvfs_rename.c4
-rw-r--r--source4/ntvfs/posix/pvfs_resolve.c6
-rw-r--r--source4/ntvfs/posix/pvfs_shortname.c2
-rw-r--r--source4/ntvfs/posix/pvfs_util.c3
4 files changed, 7 insertions, 8 deletions
diff --git a/source4/ntvfs/posix/pvfs_rename.c b/source4/ntvfs/posix/pvfs_rename.c
index d8ea5896e5..475ce3048f 100644
--- a/source4/ntvfs/posix/pvfs_rename.c
+++ b/source4/ntvfs/posix/pvfs_rename.c
@@ -115,8 +115,8 @@ 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(iconv_convenience, p1, &c_size1);
- c2 = next_codepoint(iconv_convenience, p2, &c_size2);
+ c1 = next_codepoint_convenience(iconv_convenience, p1, &c_size1);
+ c2 = next_codepoint_convenience(iconv_convenience, p2, &c_size2);
if (c2 == '?') {
d += push_codepoint(iconv_convenience, d, c1);
} else if (c2 == '*') {
diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c
index 0f19788b97..1e13474b9e 100644
--- a/source4/ntvfs/posix/pvfs_resolve.c
+++ b/source4/ntvfs/posix/pvfs_resolve.c
@@ -265,7 +265,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(lp_iconv_convenience(pvfs->ntvfs->ctx->lp_ctx), p, &c_size);
+ codepoint_t c = next_codepoint_convenience(lp_iconv_convenience(pvfs->ntvfs->ctx->lp_ctx), p, &c_size);
switch (c) {
case '\\':
if (name->has_wildcard) {
@@ -358,7 +358,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx,
if (s == NULL) return NT_STATUS_NO_MEMORY;
for (num_components=1, p=s; *p; p += c_size) {
- c = next_codepoint(iconv_convenience, p, &c_size);
+ c = next_codepoint_convenience(iconv_convenience, p, &c_size);
if (c == '\\') num_components++;
}
@@ -370,7 +370,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx,
components[0] = s;
for (i=0, p=s; *p; p += c_size) {
- c = next_codepoint(iconv_convenience, p, &c_size);
+ c = next_codepoint_convenience(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 923887debd..530def9163 100644
--- a/source4/ntvfs/posix/pvfs_shortname.c
+++ b/source4/ntvfs/posix/pvfs_shortname.c
@@ -390,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(ctx->iconv_convenience, name, &c_size);
+ codepoint_t c = next_codepoint_convenience(ctx->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 2aea15fbd1..8f95992e9a 100644
--- a/source4/ntvfs/posix/pvfs_util.c
+++ b/source4/ntvfs/posix/pvfs_util.c
@@ -179,11 +179,10 @@ uint32_t pvfs_name_hash(const char *key, size_t length)
const uint32_t fnv1_prime = 0x01000193;
const uint32_t fnv1_init = 0xa6b93095;
uint32_t value = fnv1_init;
- struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(global_loadparm);
while (*key && length--) {
size_t c_size;
- codepoint_t c = next_codepoint(iconv_convenience, key, &c_size);
+ codepoint_t c = next_codepoint(key, &c_size);
c = toupper_m(c);
value *= fnv1_prime;
value ^= (uint32_t)c;