summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_search.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-09-29 13:17:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:30 -0500
commitdcad0f6fd492506efd9a69b4e32c7bbfa5da90e5 (patch)
tree5dd39ae343981c37d3a735abf0cb799a86b1245b /source4/ntvfs/posix/pvfs_search.c
parentcd5326a44ee1f83ff9a1d96d50b56db9a2eb0d94 (diff)
downloadsamba-dcad0f6fd492506efd9a69b4e32c7bbfa5da90e5.tar.gz
samba-dcad0f6fd492506efd9a69b4e32c7bbfa5da90e5.tar.bz2
samba-dcad0f6fd492506efd9a69b4e32c7bbfa5da90e5.zip
r2751: this is a new ntvfs design which tries to solve:
- the stacking of modules - finding the modules private data - hide the ntvfs details from the calling layer - I set NTVFS_INTERFACE_VERSION 0 till we are closer to release (because we need to solve some async problems with the module stacking) metze (This used to be commit 3ff03b5cb21bb79afdd3b1609be9635f6688a539)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_search.c')
-rw-r--r--source4/ntvfs/posix/pvfs_search.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c
index 414b010263..f8d538bab2 100644
--- a/source4/ntvfs/posix/pvfs_search.c
+++ b/source4/ntvfs/posix/pvfs_search.c
@@ -250,12 +250,13 @@ again:
/*
list files in a directory matching a wildcard pattern - old SMBsearch interface
*/
-static NTSTATUS pvfs_search_first_old(struct smbsrv_request *req, union smb_search_first *io,
+static NTSTATUS pvfs_search_first_old(struct ntvfs_module_context *ntvfs,
+ struct smbsrv_request *req, union smb_search_first *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
struct pvfs_dir *dir;
- NTVFS_GET_PRIVATE(pvfs_state, pvfs, req);
+ struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_search_state *search;
uint_t reply_count;
uint16_t search_attrib;
@@ -327,11 +328,12 @@ static NTSTATUS pvfs_search_first_old(struct smbsrv_request *req, union smb_sear
}
/* continue a old style search */
-static NTSTATUS pvfs_search_next_old(struct smbsrv_request *req, union smb_search_next *io,
+static NTSTATUS pvfs_search_next_old(struct ntvfs_module_context *ntvfs,
+ struct smbsrv_request *req, union smb_search_next *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
- NTVFS_GET_PRIVATE(pvfs_state, pvfs, req);
+ struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_search_state *search;
struct pvfs_dir *dir;
uint_t reply_count, max_count;
@@ -374,12 +376,13 @@ static NTSTATUS pvfs_search_next_old(struct smbsrv_request *req, union smb_searc
/*
list files in a directory matching a wildcard pattern
*/
-NTSTATUS pvfs_search_first(struct smbsrv_request *req, union smb_search_first *io,
+NTSTATUS pvfs_search_first(struct ntvfs_module_context *ntvfs,
+ struct smbsrv_request *req, union smb_search_first *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
struct pvfs_dir *dir;
- NTVFS_GET_PRIVATE(pvfs_state, pvfs, req);
+ struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_search_state *search;
uint_t reply_count;
uint16_t search_attrib, max_count;
@@ -388,7 +391,7 @@ NTSTATUS pvfs_search_first(struct smbsrv_request *req, union smb_search_first *i
struct pvfs_filename *name;
if (io->generic.level >= RAW_SEARCH_SEARCH) {
- return pvfs_search_first_old(req, io, search_private, callback);
+ return pvfs_search_first_old(ntvfs, req, io, search_private, callback);
}
search_attrib = io->t2ffirst.in.search_attrib;
@@ -466,11 +469,12 @@ NTSTATUS pvfs_search_first(struct smbsrv_request *req, union smb_search_first *i
}
/* continue a search */
-NTSTATUS pvfs_search_next(struct smbsrv_request *req, union smb_search_next *io,
+NTSTATUS pvfs_search_next(struct ntvfs_module_context *ntvfs,
+ struct smbsrv_request *req, union smb_search_next *io,
void *search_private,
BOOL (*callback)(void *, union smb_search_data *))
{
- NTVFS_GET_PRIVATE(pvfs_state, pvfs, req);
+ struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_search_state *search;
struct pvfs_dir *dir;
uint_t reply_count;
@@ -479,7 +483,7 @@ NTSTATUS pvfs_search_next(struct smbsrv_request *req, union smb_search_next *io,
int i;
if (io->generic.level >= RAW_SEARCH_SEARCH) {
- return pvfs_search_next_old(req, io, search_private, callback);
+ return pvfs_search_next_old(ntvfs, req, io, search_private, callback);
}
handle = io->t2fnext.in.handle;
@@ -545,9 +549,10 @@ found:
}
/* close a search */
-NTSTATUS pvfs_search_close(struct smbsrv_request *req, union smb_search_close *io)
+NTSTATUS pvfs_search_close(struct ntvfs_module_context *ntvfs,
+ struct smbsrv_request *req, union smb_search_close *io)
{
- NTVFS_GET_PRIVATE(pvfs_state, pvfs, req);
+ struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_search_state *search;
uint16_t handle;