diff options
author | James Peach <jpeach@apple.com> | 2007-10-15 14:01:12 -0700 |
---|---|---|
committer | James Peach <jpeach@samba.org> | 2007-12-19 22:20:09 -0800 |
commit | 26b75f2d833d7a4ba588e66b5cf6cf3ed8e0b236 (patch) | |
tree | 996be5e495321023094f6750f2a53e20ffdcf654 /source3/smbd | |
parent | d2a9630a8b239118e7fc4b9dcedd860e6b7574f1 (diff) | |
download | samba-26b75f2d833d7a4ba588e66b5cf6cf3ed8e0b236.tar.gz samba-26b75f2d833d7a4ba588e66b5cf6cf3ed8e0b236.tar.bz2 samba-26b75f2d833d7a4ba588e66b5cf6cf3ed8e0b236.zip |
Expose per-fsp extension talloc context.
This patch supplements the fsp extension API with an operation to
retrieve the malloc zone pointer for that fsp.
(This used to be commit d5d9e4084cfb3db3bebff0334b93f376022ef5d3)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/vfs.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 45d0788117..96d71da8d9 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -263,19 +263,31 @@ void vfs_remove_fsp_extension(vfs_handle_struct *handle, files_struct *fsp) } } -void *vfs_fetch_fsp_extension(vfs_handle_struct *handle, files_struct *fsp) +void *vfs_memctx_fsp_extension(vfs_handle_struct *handle, files_struct *fsp) { struct vfs_fsp_data *head; for (head = fsp->vfs_extension; head; head = head->next) { if (head->owner == handle) { - return EXT_DATA_AREA(head); + return head; } } return NULL; } +void *vfs_fetch_fsp_extension(vfs_handle_struct *handle, files_struct *fsp) +{ + struct vfs_fsp_data *head; + + head = vfs_memctx_fsp_extension(handle, fsp); + if (head != NULL) { + return EXT_DATA_AREA(head); + } + + return NULL; +} + #undef EXT_DATA_AREA /***************************************************************** |