internal void Logoff(bool inError) { lock (Transport()) { if (ConnectionState != 2) { // not-connected return; } ConnectionState = 3; // disconnecting NetbiosName = null; foreach (SmbTree t in Trees) { t.TreeDisconnect(inError); } if (!inError && transport.Server.Security != SmbConstants.SecurityShare) { SmbComLogoffAndX request = new SmbComLogoffAndX(null); request.Uid = Uid; try { transport.Send(request, null); } catch (SmbException) { } Uid = 0; } ConnectionState = 0; Runtime.NotifyAll(transport); } }
internal void Logoff(bool inError) { lock (Transport()) { if (ConnectionState != 2) { // not-connected return; } ConnectionState = 3; // disconnecting NetbiosName = null; foreach (SmbTree t in Trees) { t.TreeDisconnect(inError); } if (!inError && transport.Server.Security != SmbConstants.SecurityShare) { SmbComLogoffAndX request = new SmbComLogoffAndX(null); request.Uid = Uid; try { transport.Send(request, null); } catch (SmbException) { } Uid = 0; } ConnectionState = 0; Runtime.NotifyAll(transport); } }