mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
launcher, launchctl: testing
This commit is contained in:
parent
5491187e1d
commit
1802ac8878
@ -74,7 +74,7 @@ static int call_pipe_and_report(PWSTR PipeBuf, ULONG SendSize, ULONG RecvSize)
|
|||||||
warn("KO launcher: empty buffer");
|
warn("KO launcher: empty buffer");
|
||||||
else if (L'$' == PipeBuf[0])
|
else if (L'$' == PipeBuf[0])
|
||||||
{
|
{
|
||||||
if (1 == BytesTransferred)
|
if (sizeof(WCHAR) == BytesTransferred)
|
||||||
info("OK");
|
info("OK");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -382,8 +382,6 @@ NTSTATUS SvcInstanceGetInfo(HANDLE ClientToken,
|
|||||||
ULONG ClassNameSize, InstanceNameSize, CommandLineSize;
|
ULONG ClassNameSize, InstanceNameSize, CommandLineSize;
|
||||||
NTSTATUS Result;
|
NTSTATUS Result;
|
||||||
|
|
||||||
*PSize = 0;
|
|
||||||
|
|
||||||
EnterCriticalSection(&SvcInstanceLock);
|
EnterCriticalSection(&SvcInstanceLock);
|
||||||
|
|
||||||
SvcInstance = SvcInstanceLookup(ClassName, InstanceName);
|
SvcInstance = SvcInstanceLookup(ClassName, InstanceName);
|
||||||
@ -695,10 +693,10 @@ static inline VOID SvcPipeTransactResult(NTSTATUS Result, PWSTR PipeBuf, PULONG
|
|||||||
if (NT_SUCCESS(Result))
|
if (NT_SUCCESS(Result))
|
||||||
{
|
{
|
||||||
*PipeBuf = L'$';
|
*PipeBuf = L'$';
|
||||||
(*PSize)++;
|
*PSize += sizeof(WCHAR);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*PSize = wsprintfW(PipeBuf, L"!%08lx", FspNtStatusFromWin32(Result));
|
*PSize = (wsprintfW(PipeBuf, L"!%ld", FspWin32FromNtStatus(Result)) + 1) * sizeof(WCHAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static VOID SvcPipeTransact(HANDLE ClientToken, PWSTR PipeBuf, PULONG PSize)
|
static VOID SvcPipeTransact(HANDLE ClientToken, PWSTR PipeBuf, PULONG PSize)
|
||||||
@ -734,7 +732,7 @@ static VOID SvcPipeTransact(HANDLE ClientToken, PWSTR PipeBuf, PULONG PSize)
|
|||||||
InstanceName = SvcPipeTransactGetPart(&P, PipeBufEnd);
|
InstanceName = SvcPipeTransactGetPart(&P, PipeBufEnd);
|
||||||
|
|
||||||
Result = STATUS_INVALID_PARAMETER;
|
Result = STATUS_INVALID_PARAMETER;
|
||||||
if (0 != InstanceName)
|
if (0 != ClassName && 0 != InstanceName)
|
||||||
Result = SvcInstanceStop(ClientToken, ClassName, InstanceName);
|
Result = SvcInstanceStop(ClientToken, ClassName, InstanceName);
|
||||||
|
|
||||||
SvcPipeTransactResult(Result, PipeBuf, PSize);
|
SvcPipeTransactResult(Result, PipeBuf, PSize);
|
||||||
@ -745,7 +743,7 @@ static VOID SvcPipeTransact(HANDLE ClientToken, PWSTR PipeBuf, PULONG PSize)
|
|||||||
InstanceName = SvcPipeTransactGetPart(&P, PipeBufEnd);
|
InstanceName = SvcPipeTransactGetPart(&P, PipeBufEnd);
|
||||||
|
|
||||||
Result = STATUS_INVALID_PARAMETER;
|
Result = STATUS_INVALID_PARAMETER;
|
||||||
if (0 != InstanceName)
|
if (0 != ClassName && 0 != InstanceName)
|
||||||
{
|
{
|
||||||
*PSize = PIPE_BUFFER_SIZE - 1;
|
*PSize = PIPE_BUFFER_SIZE - 1;
|
||||||
Result = SvcInstanceGetInfo(ClientToken, ClassName, InstanceName, PipeBuf + 1, PSize);
|
Result = SvcInstanceGetInfo(ClientToken, ClassName, InstanceName, PipeBuf + 1, PSize);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user