Only one VFS Module in the stack can safely use SMB_VFS_HANDLE_SET_DATA?
Richard Sharpe
realrichardsharpe at gmail.com
Fri Oct 7 10:05:20 MDT 2011
On Fri, Oct 7, 2011 at 7:56 AM, Stefan (metze) Metzmacher
<metze at samba.org> wrote:
> 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.
D'oh. I didn't notice that :-(
--
Regards,
Richard Sharpe
More information about the samba-technical
mailing list