示例#1
0
文件: l2cap.cpp 项目: mmanley/Antares
status_t
l2cap_uninit_protocol(net_protocol* protocol)
{
	flowf("\n");
	
	L2capEndpoint* endpoint = static_cast<L2capEndpoint*>(protocol);
	
	// TODO: Some more checkins	/ uninit
	EndpointList.Remove(endpoint);
	
	delete endpoint;

	return B_OK;
}
示例#2
0
void
ethernet_down(net_device *_device)
{
	ethernet_device *device = (ethernet_device *)_device;

	MutexLocker _(sListLock);

	// if the device is still part of the list, remove it
	if (device->GetDoublyLinkedListLink()->next != NULL
		|| device->GetDoublyLinkedListLink()->previous != NULL
		|| device == sCheckList.Head())
		sCheckList.Remove(device);

	close(device->fd);
	device->fd = -1;
}