Remove the thread from the list when terminating.
Modified: trunk/reactos/ntoskrnl/ke/kthread.c
_____
Modified: trunk/reactos/ntoskrnl/ke/kthread.c
--- trunk/reactos/ntoskrnl/ke/kthread.c 2005-04-23 06:45:56 UTC (rev
14762)
+++ trunk/reactos/ntoskrnl/ke/kthread.c 2005-04-23 10:11:37 UTC (rev
14763)
@@ -1137,6 +1137,9 @@
/* Lock the Dispatcher Database and the APC Queue */
DPRINT("Terminating\n");
OldIrql = KeAcquireDispatcherDatabaseLock();
+
+ /* Remove the thread from the list */
+ RemoveEntryList(&Thread->ThreadListEntry);
/* Insert into the Reaper List */
DPRINT("List: %p\n", PspReaperList);
Fixes a problem reported by WaxDragon when acquiring the nameserver
address
from DHCP. This needs to be rechecked but seems harmless.
Modified: trunk/reactos/subsys/system/dhcp/dhclient.c
_____
Modified: trunk/reactos/subsys/system/dhcp/dhclient.c
--- trunk/reactos/subsys/system/dhcp/dhclient.c 2005-04-23 05:00:10 UTC
(rev 14758)
+++ trunk/reactos/subsys/system/dhcp/dhclient.c 2005-04-23 05:43:35 UTC
(rev 14759)
@@ -465,9 +465,14 @@
}
DH_DbgPrint(MID_TRACE,("Setting Nameservers: %s\n",
nsbuf));
-
+
+ /* XXX Fixme: I think this may be wrong and that we might
have
+ * a problem somewhere else (in iphlpapi for example).
+ *
+ * Recheck the +1 below.
+ */
RegSetValueEx( RegKey, "NameServer", 0, REG_SZ,
- nsbuf, strlen(nsbuf) );
+ nsbuf, strlen(nsbuf) + 1 );
free( nsbuf );
}
Terminate System Thread after execution...forgot to add this for some
reason.Thanks to WaxDragon for reporting it
Modified: trunk/reactos/ntoskrnl/ps/thread.c
_____
Modified: trunk/reactos/ntoskrnl/ps/thread.c
--- trunk/reactos/ntoskrnl/ps/thread.c 2005-04-23 04:12:49 UTC (rev
14755)
+++ trunk/reactos/ntoskrnl/ps/thread.c 2005-04-23 04:19:35 UTC (rev
14756)
@@ -87,6 +87,9 @@
/* Call it */
(StartRoutine)(StartContext);
}
+
+ /* Exit the thread */
+ PspExitThread(STATUS_SUCCESS);
}
NTSTATUS