summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-13 22:46:09 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:56 +0100
commitd891c0c74a03d797aed1c5ac0329fd9d1d78da63 (patch)
tree65d0966014ca2bcded71ece2319a7723b03c4d3d /source4/smb_server/smb
parent8f687a5faeaf779e88c54bea4f886eb8f410d448 (diff)
downloadsamba-d891c0c74a03d797aed1c5ac0329fd9d1d78da63.tar.gz
samba-d891c0c74a03d797aed1c5ac0329fd9d1d78da63.tar.bz2
samba-d891c0c74a03d797aed1c5ac0329fd9d1d78da63.zip
r26429: Avoid use of global_smb_iconv_convenience.
(This used to be commit d37136b7abfbba75ef2e5ab855eb3382b9648b8c)
Diffstat (limited to 'source4/smb_server/smb')
-rw-r--r--source4/smb_server/smb/nttrans.c3
-rw-r--r--source4/smb_server/smb/request.c7
2 files changed, 6 insertions, 4 deletions
diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c
index 25cddd6654..34f9df8706 100644
--- a/source4/smb_server/smb/nttrans.c
+++ b/source4/smb_server/smb/nttrans.c
@@ -26,6 +26,7 @@
#include "ntvfs/ntvfs.h"
#include "libcli/raw/libcliraw.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "param/param.h"
/*
hold the state of a nttrans op while in progress. Needed to allow for async backend
@@ -372,7 +373,7 @@ static NTSTATUS nttrans_notify_change_send(struct nttrans_op *op)
ssize_t len;
SIVAL(p, 4, info->nttrans.out.changes[i].action);
- len = push_string(global_smb_iconv_convenience, p + 12, info->nttrans.out.changes[i].name.s,
+ len = push_string(lp_iconv_convenience(global_loadparm), p + 12, info->nttrans.out.changes[i].name.s,
op->trans->out.params.length -
(p+12 - op->trans->out.params.data), STR_UNICODE);
SIVAL(p, 8, len);
diff --git a/source4/smb_server/smb/request.c b/source4/smb_server/smb/request.c
index cdeba02dd7..8f6d664500 100644
--- a/source4/smb_server/smb/request.c
+++ b/source4/smb_server/smb/request.c
@@ -27,6 +27,7 @@
#include "smbd/service_stream.h"
#include "lib/stream/packet.h"
#include "ntvfs/ntvfs.h"
+#include "param/param.h"
/* we over allocate the data buffer to prevent too many realloc calls */
@@ -408,7 +409,7 @@ size_t req_push_str(struct smbsrv_request *req, uint8_t *dest, const char *str,
dest = req->out.buffer + PTR_DIFF(dest, buf0);
}
- len = push_string(global_smb_iconv_convenience, dest, str, len, flags);
+ len = push_string(lp_iconv_convenience(global_loadparm), dest, str, len, flags);
grow_size = len + PTR_DIFF(dest, req->out.data);
@@ -494,7 +495,7 @@ static size_t req_pull_ucs2(struct smbsrv_request *req, const char **dest, const
return src_len2 + alignment;
}
- ret = convert_string_talloc(req, global_smb_iconv_convenience, CH_UTF16, CH_UNIX, src, src_len2, (void **)&dest2);
+ ret = convert_string_talloc(req, lp_iconv_convenience(global_loadparm), CH_UTF16, CH_UNIX, src, src_len2, (void **)&dest2);
if (ret == -1) {
*dest = NULL;
@@ -543,7 +544,7 @@ static size_t req_pull_ascii(struct smbsrv_request *req, const char **dest, cons
src_len2++;
}
- ret = convert_string_talloc(req, global_smb_iconv_convenience, CH_DOS, CH_UNIX, src, src_len2, (void **)&dest2);
+ ret = convert_string_talloc(req, lp_iconv_convenience(global_loadparm), CH_DOS, CH_UNIX, src, src_len2, (void **)&dest2);
if (ret == -1) {
*dest = NULL;