Don't call IoRaiseHardError at DISPATCH_LEVEL
authorHervé Poussineau <hpoussin@reactos.org>
Wed, 3 May 2006 14:42:28 +0000 (14:42 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Wed, 3 May 2006 14:42:28 +0000 (14:42 +0000)
svn path=/trunk/; revision=21791

reactos/drivers/input/kbdclass/kbdclass.c
reactos/drivers/input/mouclass/mouclass.c

index 6aff637..49b76b0 100644 (file)
@@ -495,17 +495,16 @@ ClassCallback(
        if (InputCount != 0)
        {
                if (ClassDeviceExtension->InputCount + InputCount > ClassDeviceExtension->DriverExtension->DataQueueSize)
+               {
+                       /*
+                        * We're exceeding the buffer, and data will be thrown away...
+                        * FIXME: What could we do, as we are at DISPATCH_LEVEL?
+                        */
                        ReadSize = ClassDeviceExtension->DriverExtension->DataQueueSize - ClassDeviceExtension->InputCount;
+               }
                else
                        ReadSize = InputCount;
 
-               /*
-                * If we exceed the buffer, data gets thrown away...
-                * Try at least to display a dialog
-                */
-               if (Irp != NULL)
-                       IoRaiseHardError(Irp, NULL, ClassDeviceObject);
-
                /*
                 * Move the input data from the port data queue to our class data
                 * queue.
index c94fb3e..d566f43 100644 (file)
@@ -471,17 +471,16 @@ ClassCallback(
        if (InputCount != 0)
        {
                if (ClassDeviceExtension->InputCount + InputCount > ClassDeviceExtension->DriverExtension->DataQueueSize)
+               {
+                       /*
+                        * We're exceeding the buffer, and data will be thrown away...
+                        * FIXME: What could we do, as we are at DISPATCH_LEVEL?
+                        */
                        ReadSize = ClassDeviceExtension->DriverExtension->DataQueueSize - ClassDeviceExtension->InputCount;
+               }
                else
                        ReadSize = InputCount;
 
-               /*
-                * If we exceed the buffer, data gets thrown away...
-                * Try at least to display a dialog
-                */
-               if (Irp != NULL)
-                       IoRaiseHardError(Irp, NULL, ClassDeviceObject);
-
                /*
                 * Move the input data from the port data queue to our class data
                 * queue.