Temporary workaround to prevent bochs trouble.
authorRobert Dickenson <robd@reactos.org>
Tue, 24 Sep 2002 15:12:33 +0000 (15:12 +0000)
committerRobert Dickenson <robd@reactos.org>
Tue, 24 Sep 2002 15:12:33 +0000 (15:12 +0000)
svn path=/trunk/; revision=3554

reactos/drivers/net/tcpip/network/ip.c

index 4e7fceb..acfebfd 100644 (file)
@@ -370,6 +370,7 @@ PNET_TABLE_ENTRY IPCreateNTE(
     }
 
     INIT_TAG(NTE, TAG('N','T','E',' '));
     }
 
     INIT_TAG(NTE, TAG('N','T','E',' '));
+    INIT_TAG(Address, TAG('A','D','R','S'));
 
     NTE->Free = FreeNTE;
 
 
     NTE->Free = FreeNTE;
 
@@ -442,7 +443,13 @@ VOID DestroyNTE(
     /* Remove NTE from the interface list */
     RemoveEntryList(&NTE->IFListEntry);
     /* Remove NTE from the net table list */
     /* Remove NTE from the interface list */
     RemoveEntryList(&NTE->IFListEntry);
     /* Remove NTE from the net table list */
+
+/* TODO: DEBUG: removed by RobD to prevent failure when testing under bochs 6 sept 2002.
+
     RemoveEntryList(&NTE->NTListEntry);
     RemoveEntryList(&NTE->NTListEntry);
+
+ */
+
     /* Dereference the objects that are referenced */
     DereferenceObject(NTE->Address);
     DereferenceObject(NTE->Interface);
     /* Dereference the objects that are referenced */
     DereferenceObject(NTE->Address);
     DereferenceObject(NTE->Interface);
@@ -517,6 +524,11 @@ PNET_TABLE_ENTRY IPLocateNTEOnInterface(
 
     /* Search the list and return the NTE if found */
     CurrentEntry = IF->ADEListHead.Flink;
 
     /* Search the list and return the NTE if found */
     CurrentEntry = IF->ADEListHead.Flink;
+
+    if (CurrentEntry == &IF->ADEListHead) {
+        TI_DbgPrint(DEBUG_IP, ("NTE list is empty!!!\n"));
+    }
+
     while (CurrentEntry != &IF->ADEListHead) {
              Current = CONTAINING_RECORD(CurrentEntry, ADDRESS_ENTRY, ListEntry);
         if (AddrIsEqual(Address, Current->Address)) {
     while (CurrentEntry != &IF->ADEListHead) {
              Current = CONTAINING_RECORD(CurrentEntry, ADDRESS_ENTRY, ListEntry);
         if (AddrIsEqual(Address, Current->Address)) {
@@ -525,6 +537,9 @@ PNET_TABLE_ENTRY IPLocateNTEOnInterface(
             KeReleaseSpinLock(&IF->Lock, OldIrql);
             return Current->NTE;
         }
             KeReleaseSpinLock(&IF->Lock, OldIrql);
             return Current->NTE;
         }
+        else {
+            TI_DbgPrint(DEBUG_IP, ("CurrentEntry = 0x%X != &IF->ADEListHead = 0x%X.\n", CurrentEntry, &IF->ADEListHead));
+        }
         CurrentEntry = CurrentEntry->Flink;
     }
 
         CurrentEntry = CurrentEntry->Flink;
     }