summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/smb2cli_base.c12
-rw-r--r--source3/libsmb/smb2cli_base.h2
-rw-r--r--source3/libsmb/smb2cli_close.c1
-rw-r--r--source3/libsmb/smb2cli_create.c1
-rw-r--r--source3/libsmb/smb2cli_flush.c1
-rw-r--r--source3/libsmb/smb2cli_negprot.c1
-rw-r--r--source3/libsmb/smb2cli_query_directory.c1
-rw-r--r--source3/libsmb/smb2cli_read.c1
-rw-r--r--source3/libsmb/smb2cli_session.c2
-rw-r--r--source3/libsmb/smb2cli_tcon.c2
-rw-r--r--source3/libsmb/smb2cli_write.c1
11 files changed, 25 insertions, 0 deletions
diff --git a/source3/libsmb/smb2cli_base.c b/source3/libsmb/smb2cli_base.c
index def7f57d45..f8b2f6e5df 100644
--- a/source3/libsmb/smb2cli_base.c
+++ b/source3/libsmb/smb2cli_base.c
@@ -178,6 +178,7 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
uint16_t cmd,
uint32_t additional_flags,
uint32_t clear_flags,
+ unsigned int timeout,
uint32_t pid,
uint32_t tid,
uint64_t uid,
@@ -223,6 +224,15 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
SIVAL(state->hdr, SMB2_HDR_TID, tid);
SBVAL(state->hdr, SMB2_HDR_SESSION_ID, uid);
+ if (timeout > 0) {
+ struct timeval endtime;
+
+ endtime = timeval_current_ofs_msec(timeout);
+ if (!tevent_req_set_endtime(req, ev, endtime)) {
+ return req;
+ }
+ }
+
return req;
}
@@ -333,6 +343,7 @@ struct tevent_req *smb2cli_req_send(TALLOC_CTX *mem_ctx,
uint16_t cmd,
uint32_t additional_flags,
uint32_t clear_flags,
+ unsigned int timeout,
uint32_t pid,
uint32_t tid,
uint64_t uid,
@@ -346,6 +357,7 @@ struct tevent_req *smb2cli_req_send(TALLOC_CTX *mem_ctx,
req = smb2cli_req_create(mem_ctx, ev, cli, cmd,
additional_flags, clear_flags,
+ timeout,
pid, tid, uid,
fixed, fixed_len, dyn, dyn_len);
if (req == NULL) {
diff --git a/source3/libsmb/smb2cli_base.h b/source3/libsmb/smb2cli_base.h
index 595665d718..105f8ebe1c 100644
--- a/source3/libsmb/smb2cli_base.h
+++ b/source3/libsmb/smb2cli_base.h
@@ -26,6 +26,7 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
uint16_t cmd,
uint32_t additional_flags,
uint32_t clear_flags,
+ unsigned int timeout,
uint32_t pid,
uint32_t tid,
uint64_t uid,
@@ -47,6 +48,7 @@ struct tevent_req *smb2cli_req_send(TALLOC_CTX *mem_ctx,
uint16_t cmd,
uint32_t additional_flags,
uint32_t clear_flags,
+ unsigned int timeout,
uint32_t pid,
uint32_t tid,
uint64_t uid,
diff --git a/source3/libsmb/smb2cli_close.c b/source3/libsmb/smb2cli_close.c
index 3567449ee9..ccd96eacc2 100644
--- a/source3/libsmb/smb2cli_close.c
+++ b/source3/libsmb/smb2cli_close.c
@@ -55,6 +55,7 @@ struct tevent_req *smb2cli_close_send(TALLOC_CTX *mem_ctx,
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_CLOSE,
0, 0, /* flags */
+ cli->timeout,
cli->smb2.pid,
cli->smb2.tid,
cli->smb2.uid,
diff --git a/source3/libsmb/smb2cli_create.c b/source3/libsmb/smb2cli_create.c
index eaabf68431..a0df7dafde 100644
--- a/source3/libsmb/smb2cli_create.c
+++ b/source3/libsmb/smb2cli_create.c
@@ -138,6 +138,7 @@ struct tevent_req *smb2cli_create_send(
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_CREATE,
0, 0, /* flags */
+ cli->timeout,
cli->smb2.pid,
cli->smb2.tid,
cli->smb2.uid,
diff --git a/source3/libsmb/smb2cli_flush.c b/source3/libsmb/smb2cli_flush.c
index 6f3de14787..ea15f25e20 100644
--- a/source3/libsmb/smb2cli_flush.c
+++ b/source3/libsmb/smb2cli_flush.c
@@ -53,6 +53,7 @@ struct tevent_req *smb2cli_flush_send(TALLOC_CTX *mem_ctx,
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_FLUSH,
0, 0, /* flags */
+ cli->timeout,
cli->smb2.pid,
cli->smb2.tid,
cli->smb2.uid,
diff --git a/source3/libsmb/smb2cli_negprot.c b/source3/libsmb/smb2cli_negprot.c
index ea983a9ff9..dec6c4c998 100644
--- a/source3/libsmb/smb2cli_negprot.c
+++ b/source3/libsmb/smb2cli_negprot.c
@@ -68,6 +68,7 @@ struct tevent_req *smb2cli_negprot_send(TALLOC_CTX *mem_ctx,
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_NEGPROT,
0, 0, /* flags */
+ cli->timeout,
cli->smb2.pid,
0, 0, /* tid, uid */
state->fixed, sizeof(state->fixed),
diff --git a/source3/libsmb/smb2cli_query_directory.c b/source3/libsmb/smb2cli_query_directory.c
index f2101abd37..2d2c4658a1 100644
--- a/source3/libsmb/smb2cli_query_directory.c
+++ b/source3/libsmb/smb2cli_query_directory.c
@@ -88,6 +88,7 @@ struct tevent_req *smb2cli_query_directory_send(TALLOC_CTX *mem_ctx,
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_FIND,
0, 0, /* flags */
+ cli->timeout,
cli->smb2.pid,
cli->smb2.tid,
cli->smb2.uid,
diff --git a/source3/libsmb/smb2cli_read.c b/source3/libsmb/smb2cli_read.c
index 7e2b53471b..75754fe6b1 100644
--- a/source3/libsmb/smb2cli_read.c
+++ b/source3/libsmb/smb2cli_read.c
@@ -67,6 +67,7 @@ struct tevent_req *smb2cli_read_send(TALLOC_CTX *mem_ctx,
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_READ,
0, 0, /* flags */
+ cli->timeout,
cli->smb2.pid,
cli->smb2.tid,
cli->smb2.uid,
diff --git a/source3/libsmb/smb2cli_session.c b/source3/libsmb/smb2cli_session.c
index 2a00593ed0..28b8f91b1b 100644
--- a/source3/libsmb/smb2cli_session.c
+++ b/source3/libsmb/smb2cli_session.c
@@ -75,6 +75,7 @@ static struct tevent_req *smb2cli_sesssetup_blob_send(TALLOC_CTX *mem_ctx,
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_SESSSETUP,
0, 0, /* flags */
+ cli->timeout,
cli->smb2.pid,
0, /* tid */
cli->smb2.uid,
@@ -355,6 +356,7 @@ struct tevent_req *smb2cli_logoff_send(TALLOC_CTX *mem_ctx,
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_LOGOFF,
0, 0, /* flags */
+ cli->timeout,
cli->smb2.pid,
0, /* tid */
cli->smb2.uid,
diff --git a/source3/libsmb/smb2cli_tcon.c b/source3/libsmb/smb2cli_tcon.c
index dee9140ce6..d501838bf6 100644
--- a/source3/libsmb/smb2cli_tcon.c
+++ b/source3/libsmb/smb2cli_tcon.c
@@ -83,6 +83,7 @@ struct tevent_req *smb2cli_tcon_send(TALLOC_CTX *mem_ctx,
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_TCON,
0, 0, /* flags */
+ cli->timeout,
cli->smb2.pid,
0, /* tid */
cli->smb2.uid,
@@ -190,6 +191,7 @@ struct tevent_req *smb2cli_tdis_send(TALLOC_CTX *mem_ctx,
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_TDIS,
0, 0, /* flags */
+ cli->timeout,
cli->smb2.pid,
cli->smb2.tid,
cli->smb2.uid,
diff --git a/source3/libsmb/smb2cli_write.c b/source3/libsmb/smb2cli_write.c
index 149a0655d2..a6373899a7 100644
--- a/source3/libsmb/smb2cli_write.c
+++ b/source3/libsmb/smb2cli_write.c
@@ -76,6 +76,7 @@ struct tevent_req *smb2cli_write_send(TALLOC_CTX *mem_ctx,
subreq = smb2cli_req_send(state, ev, cli, SMB2_OP_WRITE,
0, 0, /* flags */
+ cli->timeout,
cli->smb2.pid,
cli->smb2.tid,
cli->smb2.uid,