diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-03-10 20:49:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:56:57 -0500 |
commit | 307e43bb5628e8b53a930c2928279af994281ba5 (patch) | |
tree | 68fa41cf4e697ae94b23cedab5eb7013932fc88d /source4/libcli/raw/rawnotify.c | |
parent | 2b3767b1fe7744f0412531e1522e1d5af5dc39c6 (diff) | |
download | samba-307e43bb5628e8b53a930c2928279af994281ba5.tar.gz samba-307e43bb5628e8b53a930c2928279af994281ba5.tar.bz2 samba-307e43bb5628e8b53a930c2928279af994281ba5.zip |
r14173: change smb interface structures to always use
a union smb_file, to abtract
- const char *path fot qpathinfo and setpathinfo
- uint16_t fnum for SMB
- smb2_handle handle for SMB2
the idea is to later add a struct ntvfs_handle *ntvfs
so that the ntvfs subsystem don't need to know the difference between SMB and SMB2
metze
(This used to be commit 2ef3f5970901b5accdb50f0d0115b5d46b0c788f)
Diffstat (limited to 'source4/libcli/raw/rawnotify.c')
-rw-r--r-- | source4/libcli/raw/rawnotify.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source4/libcli/raw/rawnotify.c b/source4/libcli/raw/rawnotify.c index 1215a93f59..3adb1b000b 100644 --- a/source4/libcli/raw/rawnotify.c +++ b/source4/libcli/raw/rawnotify.c @@ -25,19 +25,19 @@ /**************************************************************************** change notify (async send) ****************************************************************************/ -struct smbcli_request *smb_raw_changenotify_send(struct smbcli_tree *tree, struct smb_notify *parms) +struct smbcli_request *smb_raw_changenotify_send(struct smbcli_tree *tree, union smb_notify *parms) { struct smb_nttrans nt; uint16_t setup[4]; nt.in.max_setup = 0; - nt.in.max_param = parms->in.buffer_size; + nt.in.max_param = parms->notify.in.buffer_size; nt.in.max_data = 0; nt.in.setup_count = 4; nt.in.setup = setup; - SIVAL(setup, 0, parms->in.completion_filter); - SSVAL(setup, 4, parms->in.fnum); - SSVAL(setup, 6, parms->in.recursive); + SIVAL(setup, 0, parms->notify.in.completion_filter); + SSVAL(setup, 4, parms->notify.file.fnum); + SSVAL(setup, 6, parms->notify.in.recursive); nt.in.function = NT_TRANSACT_NOTIFY_CHANGE; nt.in.params = data_blob(NULL, 0); nt.in.data = data_blob(NULL, 0); @@ -49,7 +49,7 @@ struct smbcli_request *smb_raw_changenotify_send(struct smbcli_tree *tree, struc change notify (async recv) ****************************************************************************/ NTSTATUS smb_raw_changenotify_recv(struct smbcli_request *req, - TALLOC_CTX *mem_ctx, struct smb_notify *parms) + TALLOC_CTX *mem_ctx, union smb_notify *parms) { struct smb_nttrans nt; NTSTATUS status; @@ -61,28 +61,28 @@ NTSTATUS smb_raw_changenotify_recv(struct smbcli_request *req, return status; } - parms->out.changes = NULL; - parms->out.num_changes = 0; + parms->notify.out.changes = NULL; + parms->notify.out.num_changes = 0; /* count them */ for (ofs=0; nt.out.params.length - ofs > 12; ) { uint32_t next = IVAL(nt.out.params.data, ofs); - parms->out.num_changes++; + parms->notify.out.num_changes++; if (next == 0 || ofs + next >= nt.out.params.length) break; ofs += next; } /* allocate array */ - parms->out.changes = talloc_array(mem_ctx, struct notify_changes, parms->out.num_changes); - if (!parms->out.changes) { + parms->notify.out.changes = talloc_array(mem_ctx, struct notify_changes, parms->notify.out.num_changes); + if (!parms->notify.out.changes) { return NT_STATUS_NO_MEMORY; } - for (i=ofs=0; i<parms->out.num_changes; i++) { - parms->out.changes[i].action = IVAL(nt.out.params.data, ofs+4); + for (i=ofs=0; i<parms->notify.out.num_changes; i++) { + parms->notify.out.changes[i].action = IVAL(nt.out.params.data, ofs+4); smbcli_blob_pull_string(session, mem_ctx, &nt.out.params, - &parms->out.changes[i].name, + &parms->notify.out.changes[i].name, ofs+8, ofs+12, STR_UNICODE); ofs += IVAL(nt.out.params.data, ofs); } |