예제 #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
파일: ethernet.cpp 프로젝트: luciang/haiku
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;
}