diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-07-23 21:34:58 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-07-24 21:22:44 +0200 |
commit | b9100a7ac443159716398aaadfab34af64d8858b (patch) | |
tree | 7148b0a41ec094b19e27b2ee85b18cded4f88254 /source4/libcli | |
parent | 29dc01b1755081b1b7a9b38ad4f7e6fdaa795bf9 (diff) | |
download | samba-b9100a7ac443159716398aaadfab34af64d8858b.tar.gz samba-b9100a7ac443159716398aaadfab34af64d8858b.tar.bz2 samba-b9100a7ac443159716398aaadfab34af64d8858b.zip |
libcli/smb: pass down smbXcli_tcon to smb1cli_req_create/send() and smb1cli_trans*
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 24 21:22:44 CEST 2012 on sn-devel-104
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/raw/clitransport.c | 13 | ||||
-rw-r--r-- | source4/libcli/raw/rawtrans.c | 20 |
2 files changed, 22 insertions, 11 deletions
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c index 321df768f2..f9d96b58df 100644 --- a/source4/libcli/raw/clitransport.c +++ b/source4/libcli/raw/clitransport.c @@ -213,7 +213,7 @@ struct tevent_req *smbcli_transport_setup_subreq(struct smbcli_request *req) uint16_t additional_flags2; uint16_t clear_flags2; uint32_t pid; - uint16_t tid; + struct smbXcli_tcon *tcon = NULL; struct smbXcli_session *session = NULL; uint32_t timeout_msec = transport->options.request_timeout * 1000; struct iovec *bytes_iov = NULL; @@ -224,7 +224,6 @@ struct tevent_req *smbcli_transport_setup_subreq(struct smbcli_request *req) additional_flags2 = SVAL(req->out.hdr, HDR_FLG2); pid = SVAL(req->out.hdr, HDR_PID); pid |= SVAL(req->out.hdr, HDR_PIDHIGH)<<16; - tid = SVAL(req->out.hdr, HDR_TID); clear_flags = ~additional_flags; clear_flags2 = ~additional_flags2; @@ -233,6 +232,10 @@ struct tevent_req *smbcli_transport_setup_subreq(struct smbcli_request *req) session = req->session->smbXcli; } + if (req->tree) { + tcon = req->tree->smbXcli; + } + bytes_iov = talloc(req, struct iovec); if (bytes_iov == NULL) { return NULL; @@ -250,7 +253,7 @@ struct tevent_req *smbcli_transport_setup_subreq(struct smbcli_request *req) clear_flags2, timeout_msec, pid, - tid, + tcon, session, req->out.wct, (uint16_t *)req->out.vwv, @@ -295,7 +298,7 @@ void smbcli_transport_send(struct smbcli_request *req) 0, /* clear_flags2 */ 0, /* timeout_msec */ 0, /* pid */ - 0, /* tid */ + NULL, /* tcon */ NULL, /* session */ 0, /* wct */ NULL, /* vwv */ @@ -501,7 +504,7 @@ static void smbcli_transport_break_handler(struct tevent_req *subreq) 0, /* clear_flags2 */ 0, /* timeout_msec */ 0, /* pid */ - 0, /* tid */ + NULL, /* tcon */ NULL, /* session */ 0, /* wct */ NULL, /* vwv */ diff --git a/source4/libcli/raw/rawtrans.c b/source4/libcli/raw/rawtrans.c index 1df5209523..3a12fd30d5 100644 --- a/source4/libcli/raw/rawtrans.c +++ b/source4/libcli/raw/rawtrans.c @@ -36,7 +36,7 @@ static struct smbcli_request *smb_raw_trans_backend_send(struct smbcli_tree *tre uint16_t additional_flags2; uint16_t clear_flags2; uint32_t pid; - uint16_t tid; + struct smbXcli_tcon *tcon = NULL; struct smbXcli_session *session = NULL; const char *pipe_name = NULL; uint8_t s; @@ -54,12 +54,15 @@ static struct smbcli_request *smb_raw_trans_backend_send(struct smbcli_tree *tre additional_flags2 = SVAL(req->out.hdr, HDR_FLG2); pid = SVAL(req->out.hdr, HDR_PID); pid |= SVAL(req->out.hdr, HDR_PIDHIGH)<<16; - tid = SVAL(req->out.hdr, HDR_TID); if (req->session) { session = req->session->smbXcli; } + if (req->tree) { + tcon = req->tree->smbXcli; + } + clear_flags = ~additional_flags; clear_flags2 = ~additional_flags2; @@ -89,7 +92,8 @@ static struct smbcli_request *smb_raw_trans_backend_send(struct smbcli_tree *tre additional_flags2, clear_flags2, timeout_msec, - pid, tid, + pid, + tcon, session, pipe_name, 0xFFFF, /* fid */ @@ -262,7 +266,7 @@ struct smbcli_request *smb_raw_nttrans_send(struct smbcli_tree *tree, uint16_t additional_flags2; uint16_t clear_flags2; uint32_t pid; - uint16_t tid; + struct smbXcli_tcon *tcon = NULL; struct smbXcli_session *session = NULL; uint32_t timeout_msec; uint32_t tmp; @@ -278,12 +282,15 @@ struct smbcli_request *smb_raw_nttrans_send(struct smbcli_tree *tree, additional_flags2 = SVAL(req->out.hdr, HDR_FLG2); pid = SVAL(req->out.hdr, HDR_PID); pid |= SVAL(req->out.hdr, HDR_PIDHIGH)<<16; - tid = SVAL(req->out.hdr, HDR_TID); if (req->session) { session = req->session->smbXcli; } + if (req->tree) { + tcon = req->tree->smbXcli; + } + clear_flags = ~additional_flags; clear_flags2 = ~additional_flags2; @@ -309,7 +316,8 @@ struct smbcli_request *smb_raw_nttrans_send(struct smbcli_tree *tree, additional_flags2, clear_flags2, timeout_msec, - pid, tid, + pid, + tcon, session, NULL, /* pipe_name */ 0xFFFF, /* fid */ |