* Initialized the domain_datalink's first_{protocol|info} members. This fixes

the crashing bug reported by Atis when trying to add an interface which fails
  (the bug causing this has already been fixed with the previous commit).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38180 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2010-08-17 11:45:26 +00:00
parent 75b83073c2
commit ed18d7cf71

View File

@ -904,6 +904,8 @@ Interface::SetDown()
void
Interface::WentDown()
{
TRACE("Interface %p: went down\n", this);
RecursiveLocker locker(fLock);
AddressList::Iterator iterator = fAddresses.GetIterator();
@ -928,6 +930,8 @@ Interface::CreateDomainDatalinkIfNeeded(net_domain* domain)
if (datalink == NULL)
return B_NO_MEMORY;
datalink->first_protocol = NULL;
datalink->first_info = NULL;
datalink->domain = domain;
// setup direct route for bound devices
@ -987,6 +991,7 @@ Interface::Dump() const
kprintf("type: %u\n", type);
kprintf("mtu: %" B_PRIu32 "\n", mtu);
kprintf("metric: %" B_PRIu32 "\n", metric);
kprintf("ref count: %" B_PRId32 "\n", CountReferences());
kprintf("datalink protocols:\n");