Major refactoring: WIP

This commit is contained in:
Bill Zissimopoulos 2015-12-22 18:31:39 -08:00
parent 5bc906bcab
commit dc9d5409a7

View File

@ -362,9 +362,16 @@ NTSTATUS FspVolumeRedirQueryPathEx(
if (sizeof(QUERY_PATH_RESPONSE) > OutputBufferLength) if (sizeof(QUERY_PATH_RESPONSE) > OutputBufferLength)
return STATUS_BUFFER_TOO_SMALL; return STATUS_BUFFER_TOO_SMALL;
NTSTATUS Result;
FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension = FspFsvolDeviceExtension(FsvolDeviceObject); FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension = FspFsvolDeviceExtension(FsvolDeviceObject);
UNICODE_STRING Prefix; UNICODE_STRING Prefix;
/* acquire our DeleteResource */
ExAcquireResourceExclusiveLite(&FsvolDeviceExtension->DeleteResource, TRUE);
Result = STATUS_BAD_NETWORK_PATH;
if (!FspIoqStopped(&FsvolDeviceExtension->Ioq))
{
RtlInitUnicodeString(&Prefix, FsvolDeviceExtension->VolumeParams.Prefix); RtlInitUnicodeString(&Prefix, FsvolDeviceExtension->VolumeParams.Prefix);
if (Prefix.Length <= QueryPathRequest->PathName.Length && if (Prefix.Length <= QueryPathRequest->PathName.Length &&
RtlEqualMemory(Prefix.Buffer, QueryPathRequest->PathName.Buffer, Prefix.Length)) RtlEqualMemory(Prefix.Buffer, QueryPathRequest->PathName.Buffer, Prefix.Length))
@ -372,10 +379,14 @@ NTSTATUS FspVolumeRedirQueryPathEx(
QueryPathResponse->LengthAccepted = Prefix.Length; QueryPathResponse->LengthAccepted = Prefix.Length;
Irp->IoStatus.Information = 0; Irp->IoStatus.Information = 0;
return STATUS_SUCCESS; Result = STATUS_SUCCESS;
} }
else }
return STATUS_BAD_NETWORK_NAME;
/* release the DeleteResource */
ExReleaseResourceLite(&FsvolDeviceExtension->DeleteResource);
return Result;
} }
NTSTATUS FspVolumeGetName( NTSTATUS FspVolumeGetName(