summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-03-18 09:07:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:58:41 -0500
commit9225c02aee19478fc4825c4b798a6757d140b5c0 (patch)
tree07a4cba1f5367ad8185c09beb42ee6441386e15a /source4/smb_server/smb
parent027208806feaae02822aa22af01a09d1d044551b (diff)
downloadsamba-9225c02aee19478fc4825c4b798a6757d140b5c0.tar.gz
samba-9225c02aee19478fc4825c4b798a6757d140b5c0.tar.bz2
samba-9225c02aee19478fc4825c4b798a6757d140b5c0.zip
r14539: get rid of a pointless union layer in struct smb_notify
(This used to be commit 1e1c5593817e84c59c1a10b5a3c1957e363e5198)
Diffstat (limited to 'source4/smb_server/smb')
-rw-r--r--source4/smb_server/smb/nttrans.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c
index 78d3405e1d..17bccd79b7 100644
--- a/source4/smb_server/smb/nttrans.c
+++ b/source4/smb_server/smb/nttrans.c
@@ -342,7 +342,7 @@ static NTSTATUS nttrans_ioctl(struct smbsrv_request *req,
*/
static NTSTATUS nttrans_notify_change_send(struct nttrans_op *op)
{
- union smb_notify *info = talloc_get_type(op->op_info, union smb_notify);
+ struct smb_notify *info = talloc_get_type(op->op_info, struct smb_notify);
size_t size = 0;
int i;
NTSTATUS status;
@@ -351,8 +351,8 @@ static NTSTATUS nttrans_notify_change_send(struct nttrans_op *op)
#define MAX_BYTES_PER_CHAR 3
/* work out how big the reply buffer could be */
- for (i=0;i<info->notify.out.num_changes;i++) {
- size += 12 + 3 + (1+strlen(info->notify.out.changes[i].name.s)) * MAX_BYTES_PER_CHAR;
+ for (i=0;i<info->out.num_changes;i++) {
+ size += 12 + 3 + (1+strlen(info->out.changes[i].name.s)) * MAX_BYTES_PER_CHAR;
}
status = nttrans_setup_reply(op, op->trans, size, 0, 0);
@@ -361,11 +361,11 @@ static NTSTATUS nttrans_notify_change_send(struct nttrans_op *op)
p = op->trans->out.params.data;
/* construct the changes buffer */
- for (i=0;i<info->notify.out.num_changes;i++) {
+ for (i=0;i<info->out.num_changes;i++) {
ssize_t len;
- SIVAL(p, 4, info->notify.out.changes[i].action);
- len = push_string(p + 12, info->notify.out.changes[i].name.s,
+ SIVAL(p, 4, info->out.changes[i].action);
+ len = push_string(p + 12, info->out.changes[i].name.s,
op->trans->out.params.length - (ofs+12), STR_UNICODE);
SIVAL(p, 8, len);
@@ -394,20 +394,20 @@ static NTSTATUS nttrans_notify_change(struct smbsrv_request *req,
struct nttrans_op *op)
{
struct smb_nttrans *trans = op->trans;
- union smb_notify *info;
+ struct smb_notify *info;
/* should have at least 4 setup words */
if (trans->in.setup_count != 4) {
return NT_STATUS_INVALID_PARAMETER;
}
- info = talloc(op, union smb_notify);
+ info = talloc(op, struct smb_notify);
NT_STATUS_HAVE_NO_MEMORY(info);
- info->notify.in.completion_filter = IVAL(trans->in.setup, 0);
- info->notify.in.file.fnum = SVAL(trans->in.setup, 4);
- info->notify.in.recursive = SVAL(trans->in.setup, 6);
- info->notify.in.buffer_size = trans->in.max_param;
+ info->in.completion_filter = IVAL(trans->in.setup, 0);
+ info->in.file.fnum = SVAL(trans->in.setup, 4);
+ info->in.recursive = SVAL(trans->in.setup, 6);
+ info->in.buffer_size = trans->in.max_param;
op->op_info = info;
op->send_fn = nttrans_notify_change_send;