summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-09-16 06:55:39 +0200
committerMichael Adam <obnox@samba.org>2014-09-19 09:15:12 +0200
commitd8cffad8e00e7c6bd6727e00b247bc5443ea053d (patch)
tree62c0df6f95b1ec17803719edbd720b4b39e3e519
parent333707fa376cc27476d1fef2d291c6ae6482b1d6 (diff)
downloadsamba-d8cffad8e00e7c6bd6727e00b247bc5443ea053d.tar.gz
samba-d8cffad8e00e7c6bd6727e00b247bc5443ea053d.tar.xz
samba-d8cffad8e00e7c6bd6727e00b247bc5443ea053d.zip
s3:smbd: pass smbXsrv_connection to open_was_deferred()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r--source3/smbd/nttrans.c6
-rw-r--r--source3/smbd/process.c3
-rw-r--r--source3/smbd/proto.h2
-rw-r--r--source3/smbd/reply.c14
-rw-r--r--source3/smbd/smb2_create.c2
-rw-r--r--source3/smbd/trans2.c4
6 files changed, 16 insertions, 15 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 51adcf6c70..edad3e48e8 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -582,7 +582,7 @@ void reply_ntcreate_and_X(struct smb_request *req)
&info); /* pinfo */
if (!NT_STATUS_IS_OK(status)) {
- if (open_was_deferred(req->sconn, req->mid)) {
+ if (open_was_deferred(req->xconn, req->mid)) {
/* We have re-scheduled this call, no error. */
goto out;
}
@@ -1189,7 +1189,7 @@ static void call_nt_transact_create(connection_struct *conn,
&info); /* pinfo */
if(!NT_STATUS_IS_OK(status)) {
- if (open_was_deferred(req->sconn, req->mid)) {
+ if (open_was_deferred(req->xconn, req->mid)) {
/* We have re-scheduled this call, no error. */
return;
}
@@ -1670,7 +1670,7 @@ void reply_ntrename(struct smb_request *req)
}
if (!NT_STATUS_IS_OK(status)) {
- if (open_was_deferred(req->sconn, req->mid)) {
+ if (open_was_deferred(req->xconn, req->mid)) {
/* We have re-scheduled this call. */
goto out;
}
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 93dc4f2127..0ed78309be 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -853,8 +853,9 @@ bool schedule_deferred_open_message_smb(struct smbd_server_connection *sconn,
Return true if this mid is on the deferred queue and was not yet processed.
****************************************************************************/
-bool open_was_deferred(struct smbd_server_connection *sconn, uint64_t mid)
+bool open_was_deferred(struct smbXsrv_connection *xconn, uint64_t mid)
{
+ struct smbd_server_connection *sconn = xconn->client->sconn;
struct pending_message_list *pml;
if (sconn->using_smb2) {
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 959ef7a741..69e2ba45a1 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -753,7 +753,7 @@ void remove_deferred_open_message_smb(struct smbd_server_connection *sconn,
uint64_t mid);
bool schedule_deferred_open_message_smb(struct smbd_server_connection *sconn,
uint64_t mid);
-bool open_was_deferred(struct smbd_server_connection *sconn, uint64_t mid);
+bool open_was_deferred(struct smbXsrv_connection *xconn, uint64_t mid);
bool get_deferred_open_message_state(struct smb_request *smbreq,
struct timeval *p_request_time,
struct deferred_open_record **open_rec);
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 0d1fc23670..21be320bb6 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -2012,7 +2012,7 @@ void reply_open(struct smb_request *req)
&info); /* pinfo */
if (!NT_STATUS_IS_OK(status)) {
- if (open_was_deferred(req->sconn, req->mid)) {
+ if (open_was_deferred(req->xconn, req->mid)) {
/* We have re-scheduled this call. */
goto out;
}
@@ -2181,7 +2181,7 @@ void reply_open_and_X(struct smb_request *req)
&smb_action); /* pinfo */
if (!NT_STATUS_IS_OK(status)) {
- if (open_was_deferred(req->sconn, req->mid)) {
+ if (open_was_deferred(req->xconn, req->mid)) {
/* We have re-scheduled this call. */
goto out;
}
@@ -2429,7 +2429,7 @@ void reply_mknew(struct smb_request *req)
NULL); /* pinfo */
if (!NT_STATUS_IS_OK(status)) {
- if (open_was_deferred(req->sconn, req->mid)) {
+ if (open_was_deferred(req->xconn, req->mid)) {
/* We have re-scheduled this call. */
goto out;
}
@@ -2563,7 +2563,7 @@ void reply_ctemp(struct smb_request *req)
}
if (!NT_STATUS_IS_OK(status)) {
- if (open_was_deferred(req->sconn, req->mid)) {
+ if (open_was_deferred(req->xconn, req->mid)) {
/* We have re-scheduled this call. */
goto out;
}
@@ -3052,7 +3052,7 @@ void reply_unlink(struct smb_request *req)
status = unlink_internals(conn, req, dirtype, smb_fname,
path_contains_wcard);
if (!NT_STATUS_IS_OK(status)) {
- if (open_was_deferred(req->sconn, req->mid)) {
+ if (open_was_deferred(req->xconn, req->mid)) {
/* We have re-scheduled this call. */
goto out;
}
@@ -6046,7 +6046,7 @@ void reply_rmdir(struct smb_request *req)
&info); /* pinfo */
if (!NT_STATUS_IS_OK(status)) {
- if (open_was_deferred(req->sconn, req->mid)) {
+ if (open_was_deferred(req->xconn, req->mid)) {
/* We have re-scheduled this call. */
goto out;
}
@@ -7121,7 +7121,7 @@ void reply_mv(struct smb_request *req)
attrs, False, src_has_wcard, dest_has_wcard,
DELETE_ACCESS);
if (!NT_STATUS_IS_OK(status)) {
- if (open_was_deferred(req->sconn, req->mid)) {
+ if (open_was_deferred(req->xconn, req->mid)) {
/* We have re-scheduled this call. */
goto out;
}
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 18534349bd..3225a82a53 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -956,7 +956,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
&result,
&info);
if (!NT_STATUS_IS_OK(status)) {
- if (open_was_deferred(smb1req->sconn, smb1req->mid)) {
+ if (open_was_deferred(smb1req->xconn, smb1req->mid)) {
return req;
}
tevent_req_nterror(req, status);
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index a8043ce0a7..60128efdf3 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -1230,7 +1230,7 @@ static void call_trans2open(connection_struct *conn,
&smb_action); /* psbuf */
if (!NT_STATUS_IS_OK(status)) {
- if (open_was_deferred(req->sconn, req->mid)) {
+ if (open_was_deferred(req->xconn, req->mid)) {
/* We have re-scheduled this call. */
goto out;
}
@@ -8391,7 +8391,7 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
ppdata, total_data,
&data_return_size);
if (!NT_STATUS_IS_OK(status)) {
- if (open_was_deferred(req->sconn, req->mid)) {
+ if (open_was_deferred(req->xconn, req->mid)) {
/* We have re-scheduled this call. */
return;
}