From 0b10ed0573f17ab90509ecdbdea508658641674f Mon Sep 17 00:00:00 2001 From: Hugo Santos Date: Fri, 6 Apr 2007 06:23:27 +0000 Subject: [PATCH] check if the device going down is the head of the check list and remove it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20599 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/network/devices/ethernet/ethernet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/add-ons/kernel/network/devices/ethernet/ethernet.cpp b/src/add-ons/kernel/network/devices/ethernet/ethernet.cpp index bec50f2533..90cc08eed7 100644 --- a/src/add-ons/kernel/network/devices/ethernet/ethernet.cpp +++ b/src/add-ons/kernel/network/devices/ethernet/ethernet.cpp @@ -216,7 +216,8 @@ ethernet_down(net_device *_device) // if the device is still part of the list, remove it if (device->GetDoublyLinkedListLink()->next != NULL - || device->GetDoublyLinkedListLink()->previous != NULL) + || device->GetDoublyLinkedListLink()->previous != NULL + || device == sCheckList.Head()) sCheckList.Remove(device); close(device->fd);