This will help later if we have to handle a SMB2TreeDisconnect different
compared to a SMB2SessionLogoff and a TCPDisconnect.
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Mar 15 21:56:09 CET 2012 on sn-devel-104
bool conn_close_all(struct smbd_server_connection *sconn)
{
bool ret = false;
+
if (sconn->using_smb2) {
/* SMB2 */
struct smbd_smb2_session *sess;
+
for (sess = sconn->smb2.sessions.list; sess; sess = sess->next) {
struct smbd_smb2_tcon *tcon, *tc_next;
+ file_close_user(sconn, sess->vuid);
+
for (tcon = sess->tcons.list; tcon; tcon = tc_next) {
tc_next = tcon->next;
TALLOC_FREE(tcon);
return 0;
}
+ file_close_user(session->sconn, session->vuid);
+
/* first free all tcons */
while (session->tcons.list) {
talloc_free(session->tcons.list);