summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-08 13:02:51 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-08 15:21:46 +0200
commitd6cd1ee03296a809a98031ca52de72a7757b4058 (patch)
tree3a3ad9ee04597b65c53bd5c5a1bc62bf4d929204 /source3
parentfccc607a5dd9b9df8d6c4edac0376e819a97c301 (diff)
downloadsamba-d6cd1ee03296a809a98031ca52de72a7757b4058.tar.gz
samba-d6cd1ee03296a809a98031ca52de72a7757b4058.tar.bz2
samba-d6cd1ee03296a809a98031ca52de72a7757b4058.zip
s3:libsmb: remove unused cli->inbuf and cli->bufsize
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Jul 8 15:21:46 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/include/client.h2
-rw-r--r--source3/libsmb/cliconnect.c9
-rw-r--r--source3/libsmb/clientgen.c12
3 files changed, 1 insertions, 22 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index bd6de4afb9..4fb785e9d6 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -94,8 +94,6 @@ struct cli_state {
int timeout; /* in milliseconds. */
size_t max_xmit;
size_t max_mux;
- char *inbuf;
- unsigned int bufsize;
int initialised;
int win95;
bool is_samba;
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 8c74d2e6cc..c5432973d3 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -2699,15 +2699,6 @@ static void cli_negprot_done(struct tevent_req *subreq)
cli_set_signing_negotiated(cli);
}
- if (cli->capabilities & (CAP_LARGE_READX|CAP_LARGE_WRITEX)) {
- SAFE_FREE(cli->inbuf);
- cli->inbuf = (char *)SMB_MALLOC(CLI_SAMBA_MAX_LARGE_READX_SIZE+LARGE_WRITEX_HDR_SIZE+SAFETY_MARGIN);
- if (tevent_req_nomem(cli->inbuf, req)) {
- return;
- }
- cli->bufsize = CLI_SAMBA_MAX_LARGE_READX_SIZE + LARGE_WRITEX_HDR_SIZE;
- }
-
} else if (cli->protocol >= PROTOCOL_LANMAN1) {
cli->use_spnego = False;
cli->sec_mode = SVAL(vwv + 1, 0);
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index e874a8983c..2380ceb32c 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -200,9 +200,7 @@ struct cli_state *cli_initialise_ex(int signing_state)
cli->vuid = UID_FIELD_INVALID;
cli->protocol = PROTOCOL_NT1;
cli->timeout = 20000; /* Timeout is in milliseconds. */
- cli->bufsize = CLI_BUFFER_SIZE+4;
- cli->max_xmit = cli->bufsize;
- cli->inbuf = (char *)SMB_MALLOC(cli->bufsize+SAFETY_MARGIN);
+ cli->max_xmit = CLI_BUFFER_SIZE+4;
cli->oplock_handler = cli_oplock_ack;
cli->case_sensitive = false;
@@ -237,11 +235,6 @@ struct cli_state *cli_initialise_ex(int signing_state)
mandatory_signing = true;
}
- if (!cli->inbuf)
- goto error;
-
- memset(cli->inbuf, 0, cli->bufsize);
-
/* initialise signing */
cli->signing_state = smb_signing_init(cli,
allow_smb_signing,
@@ -264,7 +257,6 @@ struct cli_state *cli_initialise_ex(int signing_state)
error:
- SAFE_FREE(cli->inbuf);
TALLOC_FREE(cli);
return NULL;
}
@@ -308,8 +300,6 @@ static void _cli_shutdown(struct cli_state *cli)
cli_tdis(cli);
}
- SAFE_FREE(cli->inbuf);
-
data_blob_free(&cli->secblob);
data_blob_free(&cli->user_session_key);