[SCM] Samba Shared Repository - branch master updated -
13eefa7c435cb5ac656f662c78260a82caf43180
Volker Lendecke
vlendec at samba.org
Fri Dec 19 17:01:17 GMT 2008
The branch, master has been updated
via 13eefa7c435cb5ac656f662c78260a82caf43180 (commit)
via 1f04d07db0d53630d400ed35cecf7c66d3bb491c (commit)
from 398ef0fb855b3b2d6e55ae26304589fd89110628 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 13eefa7c435cb5ac656f662c78260a82caf43180
Author: Volker Lendecke <vl at samba.org>
Date: Fri Dec 19 17:50:34 2008 +0100
Add a doxygen comment line I forgot to merge
commit 1f04d07db0d53630d400ed35cecf7c66d3bb491c
Author: Volker Lendecke <vl at samba.org>
Date: Fri Dec 19 17:44:32 2008 +0100
Convert cli_request->outbuf to uint8_t
-----------------------------------------------------------------------
Summary of changes:
source3/include/async_smb.h | 4 ++--
source3/libsmb/async_smb.c | 29 ++++++++++++++++-------------
2 files changed, 18 insertions(+), 15 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/include/async_smb.h b/source3/include/async_smb.h
index f8f94aa..ef53ee2 100644
--- a/source3/include/async_smb.h
+++ b/source3/include/async_smb.h
@@ -66,7 +66,7 @@ struct cli_request {
/**
* The bytes we have to ship to the server
*/
- char *outbuf;
+ uint8_t *outbuf;
/**
* How much from "outbuf" did we already send
@@ -126,7 +126,7 @@ bool cli_chain_cork(struct cli_state *cli, struct event_context *ev,
size_t size_hint);
void cli_chain_uncork(struct cli_state *cli);
bool cli_in_chain(struct cli_state *cli);
-bool smb_splice_chain(char **poutbuf, uint8_t smb_command,
+bool smb_splice_chain(uint8_t **poutbuf, uint8_t smb_command,
uint8_t wct, const uint16_t *vwv,
size_t bytes_alignment,
uint32_t num_bytes, const uint8_t *bytes);
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index a5ce505..fdcbb00 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -127,7 +127,7 @@ static char *cli_request_print(TALLOC_CTX *mem_ctx, struct async_req *req)
static int cli_request_destructor(struct cli_request *req)
{
if (req->enc_state != NULL) {
- common_free_enc_buffer(req->enc_state, req->outbuf);
+ common_free_enc_buffer(req->enc_state, (char *)req->outbuf);
}
DLIST_REMOVE(req->cli->outstanding_requests, req);
if (req->cli->outstanding_requests == NULL) {
@@ -187,7 +187,7 @@ static bool is_andx_req(uint8_t cmd)
* to the chain. Find the offset to the place where we have to put our cmd.
*/
-static bool find_andx_cmd_ofs(char *buf, size_t *pofs)
+static bool find_andx_cmd_ofs(uint8_t *buf, size_t *pofs)
{
uint8_t cmd;
size_t ofs;
@@ -231,12 +231,12 @@ static bool find_andx_cmd_ofs(char *buf, size_t *pofs)
* *poutbuf.
*/
-bool smb_splice_chain(char **poutbuf, uint8_t smb_command,
+bool smb_splice_chain(uint8_t **poutbuf, uint8_t smb_command,
uint8_t wct, const uint16_t *vwv,
size_t bytes_alignment,
uint32_t num_bytes, const uint8_t *bytes)
{
- char *outbuf;
+ uint8_t *outbuf;
size_t old_size, new_size;
size_t ofs;
size_t chain_padding = 0;
@@ -280,7 +280,7 @@ bool smb_splice_chain(char **poutbuf, uint8_t smb_command,
return false;
}
- outbuf = TALLOC_REALLOC_ARRAY(NULL, *poutbuf, char, new_size);
+ outbuf = TALLOC_REALLOC_ARRAY(NULL, *poutbuf, uint8_t, new_size);
if (outbuf == NULL) {
DEBUG(0, ("talloc failed\n"));
return false;
@@ -295,7 +295,7 @@ bool smb_splice_chain(char **poutbuf, uint8_t smb_command,
if (!find_andx_cmd_ofs(outbuf, &andx_cmd_ofs)) {
DEBUG(1, ("invalid command chain\n"));
*poutbuf = TALLOC_REALLOC_ARRAY(
- NULL, *poutbuf, char, old_size);
+ NULL, *poutbuf, uint8_t, old_size);
return false;
}
@@ -401,6 +401,7 @@ static int cli_async_req_destructor(struct async_req *req)
* @param[in] additional_flags open_and_x wants to add oplock header flags
* @param[in] wct How many words?
* @param[in] vwv The words, already in network order
+ * @param[in] bytes_alignment How shall we align "bytes"?
* @param[in] num_bytes How many bytes?
* @param[in] bytes The data the request ships
*
@@ -512,11 +513,12 @@ bool cli_chain_cork(struct cli_state *cli, struct event_context *ev,
if (size_hint == 0) {
size_hint = 100;
}
- req->outbuf = talloc_array(req, char, smb_wct + size_hint);
+ req->outbuf = talloc_array(req, uint8_t, smb_wct + size_hint);
if (req->outbuf == NULL) {
goto fail;
}
- req->outbuf = TALLOC_REALLOC_ARRAY(NULL, req->outbuf, char, smb_wct);
+ req->outbuf = TALLOC_REALLOC_ARRAY(NULL, req->outbuf, uint8_t,
+ smb_wct);
req->num_async = 0;
req->async = NULL;
@@ -525,7 +527,7 @@ bool cli_chain_cork(struct cli_state *cli, struct event_context *ev,
req->recv_helper.fn = NULL;
SSVAL(req->outbuf, smb_tid, cli->cnum);
- cli_setup_packet_buf(cli, req->outbuf);
+ cli_setup_packet_buf(cli, (char *)req->outbuf);
req->mid = cli_new_mid(cli);
@@ -559,22 +561,23 @@ void cli_chain_uncork(struct cli_state *cli)
cli->chain_accumulator = NULL;
SSVAL(req->outbuf, smb_mid, req->mid);
- smb_setlen(req->outbuf, talloc_get_size(req->outbuf) - 4);
+ smb_setlen((char *)req->outbuf, talloc_get_size(req->outbuf) - 4);
- cli_calculate_sign_mac(cli, req->outbuf);
+ cli_calculate_sign_mac(cli, (char *)req->outbuf);
if (cli_encryption_on(cli)) {
NTSTATUS status;
char *enc_buf;
- status = cli_encrypt_message(cli, req->outbuf, &enc_buf);
+ status = cli_encrypt_message(cli, (char *)req->outbuf,
+ &enc_buf);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("Error in encrypting client message. "
"Error %s\n", nt_errstr(status)));
TALLOC_FREE(req);
return;
}
- req->outbuf = enc_buf;
+ req->outbuf = (uint8_t *)enc_buf;
req->enc_state = cli->trans_enc_state;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list