summaryrefslogtreecommitdiff
path: root/source4/torture/rap/rap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/rap/rap.c')
-rw-r--r--source4/torture/rap/rap.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 7ef2555800..9deb53086a 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -26,6 +26,7 @@
#include "libcli/raw/libcliraw.h"
#include "libcli/libcli.h"
#include "librpc/ndr/libndr.h"
+#include "param/param.h"
#define RAP_GOTO(call) do { \
NTSTATUS _status; \
@@ -86,10 +87,10 @@ static struct rap_call *new_rap_cli_call(TALLOC_CTX *mem_ctx, uint16_t callno)
call->paramdesc = NULL;
call->datadesc = NULL;
- call->ndr_push_param = ndr_push_init_ctx(mem_ctx);
+ call->ndr_push_param = ndr_push_init_ctx(mem_ctx, lp_iconv_convenience(global_loadparm));
call->ndr_push_param->flags = RAPNDR_FLAGS;
- call->ndr_push_data = ndr_push_init_ctx(mem_ctx);
+ call->ndr_push_data = ndr_push_init_ctx(mem_ctx, lp_iconv_convenience(global_loadparm));
call->ndr_push_data->flags = RAPNDR_FLAGS;
return call;
@@ -182,7 +183,7 @@ static NTSTATUS rap_pull_string(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr,
return NT_STATUS_INVALID_PARAMETER;
*dest = talloc_zero_array(mem_ctx, char, len+1);
- pull_string(global_smb_iconv_convenience, *dest, p, len+1, len, STR_ASCII);
+ pull_string(ndr->iconv_convenience, *dest, p, len+1, len, STR_ASCII);
return NT_STATUS_OK;
}
@@ -194,7 +195,7 @@ static NTSTATUS rap_cli_do_call(struct smbcli_tree *tree, struct rap_call *call)
struct ndr_push *params;
struct smb_trans2 trans;
- params = ndr_push_init_ctx(call);
+ params = ndr_push_init_ctx(call, lp_iconv_convenience(global_loadparm));
if (params == NULL)
return NT_STATUS_NO_MEMORY;
@@ -228,10 +229,12 @@ static NTSTATUS rap_cli_do_call(struct smbcli_tree *tree, struct rap_call *call)
if (!NT_STATUS_IS_OK(result))
return result;
- call->ndr_pull_param = ndr_pull_init_blob(&trans.out.params, call);
+ call->ndr_pull_param = ndr_pull_init_blob(&trans.out.params, call,
+ lp_iconv_convenience(global_loadparm));
call->ndr_pull_param->flags = RAPNDR_FLAGS;
- call->ndr_pull_data = ndr_pull_init_blob(&trans.out.data, call);
+ call->ndr_pull_data = ndr_pull_init_blob(&trans.out.data, call,
+ lp_iconv_convenience(global_loadparm));
call->ndr_pull_data->flags = RAPNDR_FLAGS;
return result;