* Enabled removing the interface on device removal again.
* Made the return type of remove_interface() void, as it cannot fail. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37884 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1058,7 +1058,7 @@ add_interface(const char* name, net_domain_private* domain,
|
||||
|
||||
/*! Removes the interface from the list, and puts the stack's reference to it.
|
||||
*/
|
||||
status_t
|
||||
void
|
||||
remove_interface(Interface* interface)
|
||||
{
|
||||
interface->SetDown();
|
||||
@@ -1071,7 +1071,20 @@ remove_interface(Interface* interface)
|
||||
notify_interface_removed(interface);
|
||||
|
||||
interface->ReleaseReference();
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
/*! This is called whenever a device interface is being removed. We will get
|
||||
the corresponding Interface, and remove it.
|
||||
*/
|
||||
void
|
||||
interface_removed_device_interface(net_device_interface* deviceInterface)
|
||||
{
|
||||
MutexLocker locker(sLock);
|
||||
|
||||
Interface* interface = find_interface(deviceInterface->device->name);
|
||||
if (interface != NULL)
|
||||
remove_interface(interface);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user