status_t unregister_domain(net_domain* _domain) { TRACE(("unregister_domain(%p, %d, %s)\n", _domain, _domain->family, _domain->name)); net_domain_private* domain = (net_domain_private*)_domain; MutexLocker locker(sDomainLock); sDomains.Remove(domain); net_interface_private* interface = NULL; while (true) { interface = (net_interface_private*)list_remove_head_item( &domain->interfaces); if (interface == NULL) break; delete_interface(interface); } recursive_lock_destroy(&domain->lock); delete domain; return B_OK; }
status_t unregister_domain(net_domain* _domain) { TRACE(("unregister_domain(%p, %d, %s)\n", _domain, _domain->family, _domain->name)); net_domain_private* domain = (net_domain_private*)_domain; MutexLocker locker(sDomainLock); sDomains.Remove(domain); recursive_lock_destroy(&domain->lock); delete domain; return B_OK; }