diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-08-07 09:31:45 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-08-07 14:18:17 +0200 |
commit | c50a03e4e2c47b828f81f2e4dc214ec84d9cae63 (patch) | |
tree | 9b3a93b399215737652d57d3fdff350fe363ed9c /source3/smbd/dir.c | |
parent | dfae090c5d0c238f2c620d77edc6bb6cf1bb027b (diff) | |
download | samba-c50a03e4e2c47b828f81f2e4dc214ec84d9cae63.tar.gz samba-c50a03e4e2c47b828f81f2e4dc214ec84d9cae63.tar.xz samba-c50a03e4e2c47b828f81f2e4dc214ec84d9cae63.zip |
s3:smbd: remove dirptr and dirpath from connection_struct
They're both only used in the context of a function,
so we can make them stack variables.
metze
Diffstat (limited to 'source3/smbd/dir.c')
-rw-r--r-- | source3/smbd/dir.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index e2f8e69449..1c84decbde 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -407,8 +407,6 @@ NTSTATUS dptr_create(connection_struct *conn, const char *path, bool old_handle, return map_nt_error_from_unix(errno); } - string_set(&conn->dirpath,path); - if (dirhandles_open >= MAX_OPEN_DIRECTORIES) { dptr_idleoldest(); } @@ -1030,7 +1028,7 @@ static bool smbd_dirptr_8_3_mode_fn(TALLOC_CTX *ctx, } bool get_dir_entry(TALLOC_CTX *ctx, - connection_struct *conn, + struct dptr_struct *dirptr, const char *mask, uint32_t dirtype, char **_fname, @@ -1040,18 +1038,15 @@ bool get_dir_entry(TALLOC_CTX *ctx, bool check_descend, bool ask_sharemode) { + connection_struct *conn = dirptr->conn; char *fname = NULL; struct smb_filename *smb_fname = NULL; uint32_t mode = 0; long prev_offset; bool ok; - if (!conn->dirptr) { - return false; - } - ok = smbd_dirptr_get_entry(ctx, - conn->dirptr, + dirptr, mask, dirtype, check_descend, |