Author: tkreuzer
Date: Thu Aug 26 15:25:33 2010
New Revision: 48626
URL:
http://svn.reactos.org/svn/reactos?rev=48626&view=rev
Log:
[NTOSKRNL]
- Fix to PpSetCustomTargetEvent(), not to make caller wait forever in case it provided an
event it waits for
- Patch by Pierre Schweitzer
Modified:
trunk/reactos/ntoskrnl/io/pnpmgr/pnpreport.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpreport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnprepo…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpreport.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpreport.c [iso-8859-1] Thu Aug 26 15:25:33 2010
@@ -132,12 +132,25 @@
ASSERT(NotificationStructure != NULL);
ASSERT(DeviceObject != NULL);
+ if (SyncEvent)
+ {
+ ASSERT(SyncStatus);
+ *SyncStatus = STATUS_PENDING;
+ }
+
/* That call is totally wrong but notifications handler must be fixed first */
IopNotifyPlugPlayNotification(DeviceObject,
EventCategoryTargetDeviceChange,
&GUID_PNP_CUSTOM_NOTIFICATION,
NotificationStructure,
NULL);
+
+ if (SyncEvent)
+ {
+ KeSetEvent(SyncEvent, IO_NO_INCREMENT, FALSE);
+ *SyncStatus = STATUS_SUCCESS;
+ }
+
return STATUS_SUCCESS;
}