summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/clitransport.c13
-rw-r--r--source4/libcli/raw/rawtrans.c20
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 */