mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +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:
@@ -95,6 +95,20 @@ NpfsConnectPipe(PIRP Irp,
|
||||
|
||||
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)
|
||||
{
|
||||
KeResetEvent(&Ccb->ConnectEvent);
|
||||
@@ -192,6 +206,20 @@ NpfsDisconnectPipe(PNPFS_CCB Ccb)
|
||||
|
||||
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;
|
||||
KeLockMutex(&Fcb->CcbListLock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user