Author: janderwald
Date: Thu Aug 13 11:54:51 2009
New Revision: 42649
URL:
http://svn.reactos.org/svn/reactos?rev=42649&view=rev
Log:
[KS]
- Check if irp was allocated
- Unimplement KsPinGetConnectedPinFileObject
Modified:
trunk/reactos/drivers/ksfilter/ks/api.c
trunk/reactos/drivers/ksfilter/ks/pin.c
Modified: trunk/reactos/drivers/ksfilter/ks/api.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/api.c?…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/api.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/ksfilter/ks/api.c [iso-8859-1] Thu Aug 13 11:54:51 2009
@@ -1147,6 +1147,13 @@
/* create the irp */
Irp = IoBuildDeviceIoControlRequest(IoControl, DeviceObject, InBuffer, InSize,
OutBuffer, OutSize, FALSE, &Event, &IoStatusBlock);
+
+ if (!Irp)
+ {
+ /* no memory to allocate the irp */
+ return STATUS_INSUFFICIENT_RESOURCES;
+ }
+
/* HACK */
IoStack = IoGetNextIrpStackLocation(Irp);
Modified: trunk/reactos/drivers/ksfilter/ks/pin.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/pin.c?…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/pin.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/ksfilter/ks/pin.c [iso-8859-1] Thu Aug 13 11:54:51 2009
@@ -384,16 +384,14 @@
}
/*
- @implemented
+ @unimplemented
*/
PFILE_OBJECT
NTAPI
KsPinGetConnectedPinFileObject(
IN PKSPIN Pin)
{
- IKsPinImpl * This = (IKsPinImpl*)CONTAINING_RECORD(Pin, IKsPinImpl, Pin);
-
- return This->FileObject;
+ return NULL;
}
/*
@@ -1188,8 +1186,12 @@
This->ObjectHeader->Unknown = (PUNKNOWN)&This->lpVtbl;
This->ObjectHeader->ObjectType = (PVOID)&This->Pin;
- /* now inform the driver to create a new pin */
- Status = Descriptor->Dispatch->Create(&This->Pin, Irp);
+ /* does the driver have a pin dispatch */
+ if (Descriptor->Dispatch && Descriptor->Dispatch->Create)
+ {
+ /* now inform the driver to create a new pin */
+ Status = Descriptor->Dispatch->Create(&This->Pin, Irp);
+ }
if (!NT_SUCCESS(Status) && Status != STATUS_PENDING)
{