Only one VFS Module in the stack can safely use SMB_VFS_HANDLE_SET_DATA?

Stefan (metze) Metzmacher metze at samba.org
Fri Oct 7 08:56:06 MDT 2011


Am 07.10.2011 16:28, schrieb Richard Sharpe:
> Hi folks,
> 
> in looking at SMB_VFS_HANDLE_SET_DATA:
> 
> #define SMB_VFS_HANDLE_SET_DATA(handle, datap, free_fn, type, ret) { \
>         if (!(handle)) { \
>                 DEBUG(0,("%s() failed to set handle->data!\n",__FUNCTION__)); \
>                 ret; \
>         } else { \
>                 if ((handle)->free_data) { \
>                         (handle)->free_data(&(handle)->data); \
>                 } \
>                 (handle)->data = (void *)datap; \
>                 (handle)->free_data = free_fn; \
>         } \
> }

Each module gets it's own 'handle'.

#define SMB_VFS_CONNECT(conn, service, user) \
	smb_vfs_call_connect((conn)->vfs_handles, (service), (user))
#define SMB_VFS_NEXT_CONNECT(handle, service, user) \
	smb_vfs_call_connect((handle)->next, (service), (user))

conn->vfs_handles is a linked list.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20111007/ed3af94e/attachment.pgp>


More information about the samba-technical mailing list