mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 02:37:49 +02:00
SMBServer: Minor logging improvement
This commit is contained in:
parent
15f09eb751
commit
df4b7e5cef
1 changed files with 2 additions and 4 deletions
|
@ -213,7 +213,7 @@ namespace SMBLibrary.Server
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
state.ClientSocket.Close();
|
state.ClientSocket.Close();
|
||||||
Log(Severity.Warning, "Rejected Invalid NetBIOS session packet: " + ex.Message);
|
Log(Severity.Warning, "[{0}] Rejected Invalid NetBIOS session packet: {1}", state.ConnectionIdentifier, ex.Message);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ namespace SMBLibrary.Server
|
||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
Log(Severity.Trace, "Entering ProcessSendQueue");
|
Log(Severity.Trace, "[{0}] Entering ProcessSendQueue", state.ConnectionIdentifier);
|
||||||
SessionPacket response;
|
SessionPacket response;
|
||||||
bool stopped = !state.SendQueue.TryDequeue(out response);
|
bool stopped = !state.SendQueue.TryDequeue(out response);
|
||||||
if (stopped)
|
if (stopped)
|
||||||
|
@ -348,13 +348,11 @@ namespace SMBLibrary.Server
|
||||||
catch (SocketException ex)
|
catch (SocketException ex)
|
||||||
{
|
{
|
||||||
Log(Severity.Debug, "[{0}] Failed to send packet. SocketException: {1}", state.ConnectionIdentifier, ex.Message);
|
Log(Severity.Debug, "[{0}] Failed to send packet. SocketException: {1}", state.ConnectionIdentifier, ex.Message);
|
||||||
Log(Severity.Trace, "Leaving ProcessSendQueue");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
catch (ObjectDisposedException)
|
catch (ObjectDisposedException)
|
||||||
{
|
{
|
||||||
Log(Severity.Debug, "[{0}] Failed to send packet. ObjectDisposedException.", state.ConnectionIdentifier);
|
Log(Severity.Debug, "[{0}] Failed to send packet. ObjectDisposedException.", state.ConnectionIdentifier);
|
||||||
Log(Severity.Trace, "Leaving ProcessSendQueue");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue