From 39ee38d9c1aabf4db065b433d067d0da053d7d61 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 6 Dec 2007 17:52:23 +0100 Subject: r26316: Use contexts for conversion functions. (This used to be commit f6420d933b5b011d428974f3a2a57edf19e6f482) --- source4/smb_server/smb/nttrans.c | 2 +- source4/smb_server/smb/request.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'source4/smb_server/smb') diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c index 046f6ca0ec..25cddd6654 100644 --- a/source4/smb_server/smb/nttrans.c +++ b/source4/smb_server/smb/nttrans.c @@ -372,7 +372,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(p + 12, info->nttrans.out.changes[i].name.s, + len = push_string(global_smb_iconv_convenience, 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 da8d1e2d05..cdeba02dd7 100644 --- a/source4/smb_server/smb/request.c +++ b/source4/smb_server/smb/request.c @@ -408,7 +408,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(dest, str, len, flags); + len = push_string(global_smb_iconv_convenience, dest, str, len, flags); grow_size = len + PTR_DIFF(dest, req->out.data); @@ -447,7 +447,7 @@ size_t req_append_var_block(struct smbsrv_request *req, req_grow_data(req, byte_len + 3 + req->out.data_size); return byte_len + 3; } -/* +/** pull a UCS2 string from a request packet, returning a talloced unix string the string length is limited by the 3 things: @@ -494,7 +494,7 @@ static size_t req_pull_ucs2(struct smbsrv_request *req, const char **dest, const return src_len2 + alignment; } - ret = convert_string_talloc(req, CH_UTF16, CH_UNIX, src, src_len2, (void **)&dest2); + ret = convert_string_talloc(req, global_smb_iconv_convenience, CH_UTF16, CH_UNIX, src, src_len2, (void **)&dest2); if (ret == -1) { *dest = NULL; @@ -505,7 +505,7 @@ static size_t req_pull_ucs2(struct smbsrv_request *req, const char **dest, const return src_len2 + alignment; } -/* +/** pull a ascii string from a request packet, returning a talloced string the string length is limited by the 3 things: @@ -543,7 +543,7 @@ static size_t req_pull_ascii(struct smbsrv_request *req, const char **dest, cons src_len2++; } - ret = convert_string_talloc(req, CH_DOS, CH_UNIX, src, src_len2, (void **)&dest2); + ret = convert_string_talloc(req, global_smb_iconv_convenience, CH_DOS, CH_UNIX, src, src_len2, (void **)&dest2); if (ret == -1) { *dest = NULL; @@ -554,7 +554,7 @@ static size_t req_pull_ascii(struct smbsrv_request *req, const char **dest, cons return src_len2; } -/* +/** pull a string from a request packet, returning a talloced string the string length is limited by the 3 things: @@ -578,7 +578,7 @@ size_t req_pull_string(struct smbsrv_request *req, const char **dest, const uint } -/* +/** pull a ASCII4 string buffer from a request packet, returning a talloced string an ASCII4 buffer is a null terminated string that has a prefix @@ -611,7 +611,7 @@ size_t req_pull_ascii4(struct smbsrv_request *req, const char **dest, const uint return ret + 1; } -/* +/** pull a DATA_BLOB from a request packet, returning a talloced blob return false if any part is outside the data portion of the packet -- cgit