DEV9: Log when we fail to get adapter information for internal servers

This commit is contained in:
TheLastRar 2021-09-26 15:59:40 +01:00 committed by refractionpcsx2
parent 2d0ad7fb72
commit 26ea5bcfed
2 changed files with 9 additions and 0 deletions

View File

@ -563,7 +563,10 @@ TAPAdapter::TAPAdapter()
if (TAPGetWin32Adapter(config.Eth, &adapter, &buffer)) if (TAPGetWin32Adapter(config.Eth, &adapter, &buffer))
InitInternalServer(&adapter); InitInternalServer(&adapter);
else else
{
Console.Error("DEV9: Failed to get adapter information");
InitInternalServer(nullptr); InitInternalServer(nullptr);
}
isActive = true; isActive = true;
} }

View File

@ -376,7 +376,10 @@ PCAPAdapter::PCAPAdapter()
if (PCAPGetWin32Adapter(config.Eth, &adapter, &buffer)) if (PCAPGetWin32Adapter(config.Eth, &adapter, &buffer))
InitInternalServer(&adapter); InitInternalServer(&adapter);
else else
{
Console.Error("DEV9: Failed to get adapter information");
InitInternalServer(nullptr); InitInternalServer(nullptr);
}
#elif defined(__POSIX__) #elif defined(__POSIX__)
ifaddrs adapter; ifaddrs adapter;
ifaddrs* buffer; ifaddrs* buffer;
@ -386,7 +389,10 @@ PCAPAdapter::PCAPAdapter()
freeifaddrs(buffer); freeifaddrs(buffer);
} }
else else
{
Console.Error("DEV9: Failed to get adapter information");
InitInternalServer(nullptr); InitInternalServer(nullptr);
}
#endif #endif
if (pcap_io_init(config.Eth, config.EthApi == NetApi::PCAP_Switched, newMAC) == -1) if (pcap_io_init(config.Eth, config.EthApi == NetApi::PCAP_Switched, newMAC) == -1)