[Samba] VFS calls after disconnect ?

yves.lejeune at kodak.com yves.lejeune at kodak.com
Mon May 24 08:03:09 GMT 2004


I am developing a VFS module which makes connexions to a database,
and disconnects from the database when SMB_VFS_DISCONNECT is called.
I have trouble when a "map network drive" is started: it seems that a 
double parallel connexion is
made, with a pattern like:
        - SMB_VFS_CONNECT: my module connects to the database
        - SMB_VFS_CONNECT: my module does nothing, since it is already 
        - some other VFS calls
        - SMB_VFS_DISCONNECT: my module disconnects from the database
        - **** some other VFS call, e.g. VFS_STAT, which fails because I 
disconnected from my database ****
        - SMB_VFS_CONNECT: my module connects to the database
        - then the connection works well

If a Windows program maps the network drive and uses it immediately, it 
can fail if it uses it
before the initial SMB_VFS_DISCONNECT.

The share is used from Windows 2000 Professional.

Is is normal to have the initial double SMB_VFS_CONNECT and 
Should I count the number of SMB_VFS_CONNECT, and really disconnect only 
when the same
number of SMB_VFS_DISCONNECT is called ?
Or did I miss something else ?

Best regards,
Yves Lejeune.

More information about the samba mailing list