From 307e43bb5628e8b53a930c2928279af994281ba5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 10 Mar 2006 20:49:20 +0000 Subject: 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) --- source4/torture/raw/notify.c | 60 ++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'source4/torture/raw/notify.c') diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c index 7e96beb646..766c5374a9 100644 --- a/source4/torture/raw/notify.c +++ b/source4/torture/raw/notify.c @@ -60,7 +60,7 @@ BOOL torture_raw_notify(void) BOOL ret = True; TALLOC_CTX *mem_ctx; NTSTATUS status; - struct smb_notify notify; + union smb_notify notify; union smb_open io; int i, count, fnum, fnum2; struct smbcli_request *req, *req2; @@ -94,17 +94,17 @@ BOOL torture_raw_notify(void) status = smb_raw_open(cli->tree, mem_ctx, &io); CHECK_STATUS(status, NT_STATUS_OK); - fnum = io.ntcreatex.out.fnum; + fnum = io.ntcreatex.file.fnum; status = smb_raw_open(cli->tree, mem_ctx, &io); CHECK_STATUS(status, NT_STATUS_OK); - fnum2 = io.ntcreatex.out.fnum; + fnum2 = io.ntcreatex.file.fnum; /* ask for a change notify */ - notify.in.buffer_size = 1000; - notify.in.completion_filter = 0x3; - notify.in.fnum = fnum; - notify.in.recursive = True; + notify.notify.in.buffer_size = 1000; + notify.notify.in.completion_filter = 0x3; + notify.notify.file.fnum = fnum; + notify.notify.in.recursive = True; printf("testing notify mkdir\n"); @@ -114,9 +114,9 @@ BOOL torture_raw_notify(void) status = smb_raw_changenotify_recv(req, mem_ctx, ¬ify); CHECK_STATUS(status, NT_STATUS_OK); - CHECK_VAL(notify.out.num_changes, 1); - CHECK_VAL(notify.out.changes[0].action, NOTIFY_ACTION_ADDED); - CHECK_WSTR(notify.out.changes[0].name, "subdir-name", STR_UNICODE); + CHECK_VAL(notify.notify.out.num_changes, 1); + CHECK_VAL(notify.notify.out.changes[0].action, NOTIFY_ACTION_ADDED); + CHECK_WSTR(notify.notify.out.changes[0].name, "subdir-name", STR_UNICODE); printf("testing notify rmdir\n"); @@ -125,9 +125,9 @@ BOOL torture_raw_notify(void) status = smb_raw_changenotify_recv(req, mem_ctx, ¬ify); CHECK_STATUS(status, NT_STATUS_OK); - CHECK_VAL(notify.out.num_changes, 1); - CHECK_VAL(notify.out.changes[0].action, NOTIFY_ACTION_REMOVED); - CHECK_WSTR(notify.out.changes[0].name, "subdir-name", STR_UNICODE); + CHECK_VAL(notify.notify.out.num_changes, 1); + CHECK_VAL(notify.notify.out.changes[0].action, NOTIFY_ACTION_REMOVED); + CHECK_WSTR(notify.notify.out.changes[0].name, "subdir-name", STR_UNICODE); printf("testing notify cancel\n"); @@ -154,12 +154,12 @@ BOOL torture_raw_notify(void) /* setup a new notify on a different directory handle. This new notify won't see the events above. */ - notify.in.fnum = fnum2; + notify.notify.file.fnum = fnum2; req2 = smb_raw_changenotify_send(cli->tree, ¬ify); /* whereas this notify will see the above buffered events as well */ - notify.in.fnum = fnum; + notify.notify.file.fnum = fnum; req = smb_raw_changenotify_send(cli->tree, ¬ify); status = smbcli_unlink(cli->tree, BASEDIR "\\test0.txt"); @@ -169,16 +169,16 @@ BOOL torture_raw_notify(void) status = smb_raw_changenotify_recv(req, mem_ctx, ¬ify); CHECK_STATUS(status, NT_STATUS_OK); - CHECK_VAL(notify.out.num_changes, count+1); - for (i=0;itree, ¬ify); status = smb_raw_changenotify_recv(req, mem_ctx, ¬ify); CHECK_STATUS(status, NT_STATUS_OK); - CHECK_VAL(notify.out.num_changes, count-1); - for (i=0;itree, ¬ify); status = smb_raw_changenotify_recv(req, mem_ctx, ¬ify); CHECK_STATUS(status, NT_STATUS_OK); - CHECK_VAL(notify.out.num_changes, count-1); - for (i=0;i