summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr_string.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc/ndr/ndr_string.c')
-rw-r--r--source4/librpc/ndr/ndr_string.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/source4/librpc/ndr/ndr_string.c b/source4/librpc/ndr/ndr_string.c
index 7e84211e87..69a7eca1a8 100644
--- a/source4/librpc/ndr/ndr_string.c
+++ b/source4/librpc/ndr/ndr_string.c
@@ -82,7 +82,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
as = talloc_strdup(ndr->current_mem_ctx, "");
} else {
ret = convert_string_talloc(ndr->current_mem_ctx,
- global_smb_iconv_convenience, chset, CH_UNIX,
+ ndr->iconv_convenience, chset, CH_UNIX,
ndr->data+ndr->offset,
(len2 + c_len_term)*byte_mul,
(void **)&as);
@@ -119,7 +119,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
as = talloc_strdup(ndr->current_mem_ctx, "");
} else {
ret = convert_string_talloc(ndr->current_mem_ctx,
- global_smb_iconv_convenience,
+ ndr->iconv_convenience,
chset, CH_UNIX,
ndr->data+ndr->offset,
(len1 + c_len_term)*byte_mul,
@@ -158,7 +158,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
as = talloc_strdup(ndr->current_mem_ctx, "");
} else {
ret = convert_string_talloc(ndr->current_mem_ctx,
- global_smb_iconv_convenience,
+ ndr->iconv_convenience,
chset, CH_UNIX,
ndr->data+ndr->offset,
(len1 + c_len_term)*byte_mul,
@@ -193,7 +193,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
as = talloc_strdup(ndr->current_mem_ctx, "");
} else {
ret = convert_string_talloc(ndr->current_mem_ctx,
- global_smb_iconv_convenience,
+ ndr->iconv_convenience,
chset, CH_UNIX,
ndr->data+ndr->offset,
(len3 + c_len_term)*byte_mul,
@@ -226,7 +226,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
as = talloc_strdup(ndr->current_mem_ctx, "");
} else {
ret = convert_string_talloc(ndr->current_mem_ctx,
- global_smb_iconv_convenience,
+ ndr->iconv_convenience,
chset, CH_UNIX,
ndr->data+ndr->offset,
len3,
@@ -247,7 +247,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
len1 = utf16_len_n(ndr->data+ndr->offset, ndr->data_size - ndr->offset);
}
ret = convert_string_talloc(ndr->current_mem_ctx,
- global_smb_iconv_convenience, chset, CH_UNIX,
+ ndr->iconv_convenience, chset, CH_UNIX,
ndr->data+ndr->offset,
len1,
(void **)&as);
@@ -264,7 +264,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
len1 = (flags & LIBNDR_FLAG_STR_FIXLEN32)?32:15;
NDR_PULL_NEED_BYTES(ndr, len1*byte_mul);
ret = convert_string_talloc(ndr->current_mem_ctx,
- global_smb_iconv_convenience,
+ ndr->iconv_convenience,
chset, CH_UNIX,
ndr->data+ndr->offset,
len1*byte_mul,
@@ -290,7 +290,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
as = talloc_strdup(ndr->current_mem_ctx, "");
} else {
ret = convert_string_talloc(ndr->current_mem_ctx,
- global_smb_iconv_convenience,
+ ndr->iconv_convenience,
chset, CH_UNIX,
ndr->data+ndr->offset,
len1,
@@ -355,7 +355,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags,
LIBNDR_FLAG_STR_FIXLEN32))) {
s_len++;
}
- d_len = convert_string_talloc(ndr, global_smb_iconv_convenience, CH_UNIX, chset, s, s_len, (void **)&dest);
+ d_len = convert_string_talloc(ndr, ndr->iconv_convenience, CH_UNIX, chset, s, s_len, (void **)&dest);
if (d_len == -1) {
return ndr_push_error(ndr, NDR_ERR_CHARCNV,
"Bad character conversion");
@@ -689,7 +689,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_charset(struct ndr_pull *ndr, int ndr_flags,
NDR_PULL_NEED_BYTES(ndr, length*byte_mul);
- ret = convert_string_talloc(ndr->current_mem_ctx, global_smb_iconv_convenience,
+ ret = convert_string_talloc(ndr->current_mem_ctx,
+ ndr->iconv_convenience,
chset, CH_UNIX,
ndr->data+ndr->offset,
length*byte_mul,
@@ -714,7 +715,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_charset(struct ndr_push *ndr, int ndr_flags,
required = byte_mul * length;
NDR_PUSH_NEED_BYTES(ndr, required);
- ret = convert_string(global_smb_iconv_convenience, CH_UNIX, chset,
+ ret = convert_string(ndr->iconv_convenience, CH_UNIX, chset,
var, strlen(var),
ndr->data+ndr->offset, required);
if (ret == -1) {