|
@@ -113,22 +113,16 @@ namespace SMBLibrary.Server
|
|
|
state.RemoveSession(command.Header.SessionID);
|
|
|
return new LogoffResponse();
|
|
|
}
|
|
|
- else
|
|
|
+ else if (command.Header.IsAsync)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
if (command is CancelRequest)
|
|
|
{
|
|
|
- if (command.Header.IsAsync && command.Header.AsyncID == 0)
|
|
|
- {
|
|
|
- ErrorResponse response = new ErrorResponse(command.CommandName, NTStatus.STATUS_CANCELLED);
|
|
|
- response.Header.IsAsync = true;
|
|
|
- return response;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- return null;
|
|
|
+ return CancelHelper.GetCancelResponse((CancelRequest)command, state);
|
|
|
}
|
|
|
-
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
ISMBShare share = session.GetConnectedTree(command.Header.TreeID);
|
|
|
if (share == null)
|
|
|
{
|
|
@@ -175,14 +169,13 @@ namespace SMBLibrary.Server
|
|
|
{
|
|
|
return IOCtlHelper.GetIOCtlResponse((IOCtlRequest)command, share, state);
|
|
|
}
|
|
|
+ else if (command is CancelRequest)
|
|
|
+ {
|
|
|
+ return CancelHelper.GetCancelResponse((CancelRequest)command, state);
|
|
|
+ }
|
|
|
else if (command is ChangeNotifyRequest)
|
|
|
{
|
|
|
-
|
|
|
- ErrorResponse response = new ErrorResponse(command.CommandName, NTStatus.STATUS_NOT_SUPPORTED);
|
|
|
-
|
|
|
-
|
|
|
- response.Header.IsAsync = true;
|
|
|
- return response;
|
|
|
+ return ChangeNotifyHelper.GetChangeNotifyInterimResponse((ChangeNotifyRequest)command, share, state);
|
|
|
}
|
|
|
}
|
|
|
}
|