summaryrefslogtreecommitdiff
path: root/source4/libcli/nbt
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-01 22:05:05 -0600
committerStefan Metzmacher <metze@samba.org>2008-01-01 16:12:11 -0600
commit86dc05e99f124db47f2743d1fc23117a7f5145ab (patch)
treede35ed7a8a34c9efb04cfe7f94d72551ae78e176 /source4/libcli/nbt
parentcf80a01591d57d346e42a0a0f9d662cc24ddff51 (diff)
downloadsamba-86dc05e99f124db47f2743d1fc23117a7f5145ab.tar.gz
samba-86dc05e99f124db47f2743d1fc23117a7f5145ab.tar.bz2
samba-86dc05e99f124db47f2743d1fc23117a7f5145ab.zip
r26638: libndr: Require explicitly specifying iconv_convenience for ndr_struct_push_blob().
(This used to be commit 61ad78ac98937ef7a9aa32075a91a1c95b7606b3)
Diffstat (limited to 'source4/libcli/nbt')
-rw-r--r--source4/libcli/nbt/nbtname.c4
-rw-r--r--source4/libcli/nbt/nbtsocket.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/source4/libcli/nbt/nbtname.c b/source4/libcli/nbt/nbtname.c
index bdcd012556..079d0595de 100644
--- a/source4/libcli/nbt/nbtname.c
+++ b/source4/libcli/nbt/nbtname.c
@@ -27,6 +27,7 @@
#include "librpc/gen_ndr/ndr_nbt.h"
#include "librpc/gen_ndr/ndr_misc.h"
#include "system/locale.h"
+#include "param/param.h"
/* don't allow an unlimited number of name components */
#define MAX_COMPONENTS 10
@@ -384,8 +385,7 @@ _PUBLIC_ NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, struct
{
enum ndr_err_code ndr_err;
- ndr_err = ndr_push_struct_blob(blob, mem_ctx, name,
- (ndr_push_flags_fn_t)ndr_push_nbt_name);
+ ndr_err = ndr_push_struct_blob(blob, mem_ctx, lp_iconv_convenience(global_loadparm), name, (ndr_push_flags_fn_t)ndr_push_nbt_name);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return ndr_map_error2ntstatus(ndr_err);
}
diff --git a/source4/libcli/nbt/nbtsocket.c b/source4/libcli/nbt/nbtsocket.c
index 743f2b0f19..3716d40941 100644
--- a/source4/libcli/nbt/nbtsocket.c
+++ b/source4/libcli/nbt/nbtsocket.c
@@ -394,7 +394,9 @@ struct nbt_name_request *nbt_name_request_send(struct nbt_name_socket *nbtsock,
talloc_set_destructor(req, nbt_name_request_destructor);
- ndr_err = ndr_push_struct_blob(&req->encoded, req, request,
+ ndr_err = ndr_push_struct_blob(&req->encoded, req,
+ lp_iconv_convenience(global_loadparm),
+ request,
(ndr_push_flags_fn_t)ndr_push_nbt_name_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) goto failed;
@@ -441,7 +443,9 @@ NTSTATUS nbt_name_reply_send(struct nbt_name_socket *nbtsock,
NDR_PRINT_DEBUG(nbt_name_packet, request);
}
- ndr_err = ndr_push_struct_blob(&req->encoded, req, request,
+ ndr_err = ndr_push_struct_blob(&req->encoded, req,
+ lp_iconv_convenience(global_loadparm),
+ request,
(ndr_push_flags_fn_t)ndr_push_nbt_name_packet);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
talloc_free(req);