mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 05:00:27 +00:00
[NPFS]
- Fail attempts to connect or disconnect a directory or device. - Fail attempts to connect or disconnect a pipe by the client. svn path=/trunk/; revision=49948
This commit is contained in:
parent
fe0eda52aa
commit
95aa3be8eb
1 changed files with 28 additions and 0 deletions
|
@ -95,6 +95,20 @@ NpfsConnectPipe(PIRP Irp,
|
||||||
|
|
||||||
DPRINT("NpfsConnectPipe()\n");
|
DPRINT("NpfsConnectPipe()\n");
|
||||||
|
|
||||||
|
/* Fail, if the CCB is not a pipe CCB */
|
||||||
|
if (Ccb->Type != CCB_PIPE)
|
||||||
|
{
|
||||||
|
DPRINT1("Not a pipe\n");
|
||||||
|
return STATUS_ILLEGAL_FUNCTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fail, if the CCB is not a server end CCB */
|
||||||
|
if (Ccb->PipeEnd != FILE_PIPE_SERVER_END)
|
||||||
|
{
|
||||||
|
DPRINT1("Not the server end\n");
|
||||||
|
return STATUS_ILLEGAL_FUNCTION;
|
||||||
|
}
|
||||||
|
|
||||||
if (Ccb->PipeState == FILE_PIPE_CONNECTED_STATE)
|
if (Ccb->PipeState == FILE_PIPE_CONNECTED_STATE)
|
||||||
{
|
{
|
||||||
KeResetEvent(&Ccb->ConnectEvent);
|
KeResetEvent(&Ccb->ConnectEvent);
|
||||||
|
@ -192,6 +206,20 @@ NpfsDisconnectPipe(PNPFS_CCB Ccb)
|
||||||
|
|
||||||
DPRINT("NpfsDisconnectPipe()\n");
|
DPRINT("NpfsDisconnectPipe()\n");
|
||||||
|
|
||||||
|
/* Fail, if the CCB is not a pipe CCB */
|
||||||
|
if (Ccb->Type != CCB_PIPE)
|
||||||
|
{
|
||||||
|
DPRINT1("Not a pipe\n");
|
||||||
|
return STATUS_ILLEGAL_FUNCTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fail, if the CCB is not a server end CCB */
|
||||||
|
if (Ccb->PipeEnd != FILE_PIPE_SERVER_END)
|
||||||
|
{
|
||||||
|
DPRINT1("Not the server end\n");
|
||||||
|
return STATUS_ILLEGAL_FUNCTION;
|
||||||
|
}
|
||||||
|
|
||||||
Fcb = Ccb->Fcb;
|
Fcb = Ccb->Fcb;
|
||||||
KeLockMutex(&Fcb->CcbListLock);
|
KeLockMutex(&Fcb->CcbListLock);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue