summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-06-12 13:17:51 +0200
committerVolker Lendecke <vl@samba.org>2010-06-12 15:42:55 +0200
commitf589909eb1ef6117007948f54c291775141be645 (patch)
tree80960bf2bb1e9431a5baffad1a90c26e669f1a21
parent4a9b3e557f0a3b4049b301574461a39ef0e4ba09 (diff)
downloadsamba-f589909eb1ef6117007948f54c291775141be645.tar.gz
s3: change_notify_reply() does not need its "conn" argument
-rw-r--r--source3/include/proto.h7
-rw-r--r--source3/smbd/notify.c19
-rw-r--r--source3/smbd/nttrans.c2
-rw-r--r--source3/smbd/smb2_notify.c2
4 files changed, 13 insertions, 17 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 64c76a04be5..dd3c2b2f1c4 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5770,14 +5770,13 @@ void reply_negprot(struct smb_request *req);
/* The following definitions come from smbd/notify.c */
-void change_notify_reply(connection_struct *conn,
- struct smb_request *req,
+void change_notify_reply(struct smb_request *req,
NTSTATUS error_code,
uint32_t max_param,
struct notify_change_buf *notify_buf,
void (*reply_fn)(struct smb_request *req,
- NTSTATUS error_code,
- uint8_t *buf, size_t len));
+ NTSTATUS error_code,
+ uint8_t *buf, size_t len));
NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
bool recursive);
NTSTATUS change_notify_add_request(struct smb_request *req,
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index 5c5a52a95b4..926bbb788ba 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -139,14 +139,13 @@ static bool notify_marshall_changes(int num_changes,
Setup the common parts of the return packet and send it.
*****************************************************************************/
-void change_notify_reply(connection_struct *conn,
- struct smb_request *req,
+void change_notify_reply(struct smb_request *req,
NTSTATUS error_code,
uint32_t max_param,
struct notify_change_buf *notify_buf,
void (*reply_fn)(struct smb_request *req,
- NTSTATUS error_code,
- uint8_t *buf, size_t len))
+ NTSTATUS error_code,
+ uint8_t *buf, size_t len))
{
prs_struct ps;
@@ -313,7 +312,7 @@ void remove_pending_change_notify_requests_by_mid(uint64_t mid)
return;
}
- change_notify_reply(map->req->fsp->conn, map->req->req,
+ change_notify_reply(map->req->req,
NT_STATUS_CANCELLED, 0, NULL, map->req->reply_fn);
change_notify_remove_request(sconn, map->req);
}
@@ -333,7 +332,7 @@ void smbd_notify_cancel_by_smbreq(const struct smb_request *smbreq)
return;
}
- change_notify_reply(map->req->fsp->conn, map->req->req,
+ change_notify_reply(map->req->req,
NT_STATUS_CANCELLED, 0, NULL, map->req->reply_fn);
change_notify_remove_request(sconn, map->req);
}
@@ -350,7 +349,7 @@ void remove_pending_change_notify_requests_by_fid(files_struct *fsp,
}
while (fsp->notify->requests != NULL) {
- change_notify_reply(fsp->conn, fsp->notify->requests->req,
+ change_notify_reply(fsp->notify->requests->req,
status, 0, NULL,
fsp->notify->requests->reply_fn);
change_notify_remove_request(fsp->conn->sconn,
@@ -419,8 +418,7 @@ static void notify_fsp(files_struct *fsp, uint32 action, const char *name)
TALLOC_FREE(fsp->notify->changes);
fsp->notify->num_changes = -1;
if (fsp->notify->requests != NULL) {
- change_notify_reply(fsp->conn,
- fsp->notify->requests->req,
+ change_notify_reply(fsp->notify->requests->req,
NT_STATUS_OK,
fsp->notify->requests->max_param,
fsp->notify,
@@ -481,8 +479,7 @@ static void notify_fsp(files_struct *fsp, uint32 action, const char *name)
* TODO: do we have to walk the lists of requests pending?
*/
- change_notify_reply(fsp->conn,
- fsp->notify->requests->req,
+ change_notify_reply(fsp->notify->requests->req,
NT_STATUS_OK,
fsp->notify->requests->max_param,
fsp->notify,
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 38aad922d93..eae4901603b 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1679,7 +1679,7 @@ static void call_nt_transact_notify_change(connection_struct *conn,
* here.
*/
- change_notify_reply(fsp->conn, req,
+ change_notify_reply(req,
NT_STATUS_OK,
max_param_count,
fsp->notify,
diff --git a/source3/smbd/smb2_notify.c b/source3/smbd/smb2_notify.c
index 8b23caeb940..44dfce66579 100644
--- a/source3/smbd/smb2_notify.c
+++ b/source3/smbd/smb2_notify.c
@@ -283,7 +283,7 @@ static struct tevent_req *smbd_smb2_notify_send(TALLOC_CTX *mem_ctx,
* here.
*/
- change_notify_reply(fsp->conn, smbreq,
+ change_notify_reply(smbreq,
NT_STATUS_OK,
in_output_buffer_length,
fsp->notify,