Author: ion
Date: Thu Jun 29 09:20:16 2006
New Revision: 22686
URL:
http://svn.reactos.org/svn/reactos?rev=22686&view=rev
Log:
- Cleanup the checks for mishbeaving objects a bit, and now quit the Dereference routine
instead of doing the dereference. This has the advantage making console applications work
again (note: this is NOT a fix. I'm just making the situation less bad until I fix
ObDuplicateObject since that seems to be messing Events up, and until Cm gets fixed).
Modified:
trunk/reactos/ntoskrnl/ob/obhandle.c
trunk/reactos/ntoskrnl/ob/obref.c
Modified: trunk/reactos/ntoskrnl/ob/obhandle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obhandle.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obhandle.c (original)
+++ trunk/reactos/ntoskrnl/ob/obhandle.c Thu Jun 29 09:20:16 2006
@@ -242,7 +242,7 @@
//
// WE DONT CLOSE REGISTRY HANDLES BECAUSE CM IS BRAINDEAD
//
- DPRINT("NOT CLOSING THE KEY\n");
+ DPRINT1("NOT CLOSING THE KEY\n");
}
else
{
Modified: trunk/reactos/ntoskrnl/ob/obref.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obref.c?rev=22…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obref.c (original)
+++ trunk/reactos/ntoskrnl/ob/obref.c Thu Jun 29 09:20:16 2006
@@ -90,27 +90,18 @@
if (Header->PointerCount <= Header->HandleCount)
{
- if (!wcscmp(Header->Type->Name.Buffer, L"Event"))
- {
- //KEBUGCHECK(0);
- }
DPRINT1("Misbehaving object: %wZ\n", &Header->Type->Name);
+ return;
}
/* Check whether the object can now be deleted. */
if (!(InterlockedDecrement(&Header->PointerCount)))
{
/* Sanity check */
- if (wcscmp(Header->Type->Name.Buffer, L"Key"))
- {
- if(Header->HandleCount)
- {
- DPRINT1("Unexpected misbehaving object: %wZ\n",
&Header->Type->Name);
- }
- }
- else
- {
- DPRINT1("Cm needs fixing!\n");
+ if(Header->HandleCount)
+ {
+ DPRINT1("Misbehaving object: %wZ\n",
&Header->Type->Name);
+ return;
}
/* Check if we're at PASSIVE */