Fix NCDGetWirelessMacAddress always returning the hard coded MAC address instead of the "real" one

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5277 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX 2010-04-04 18:40:25 +00:00
parent 8cd46cc3bf
commit 0954dac86e
1 changed files with 5 additions and 5 deletions

View File

@ -296,21 +296,21 @@ bool CWII_IPC_HLE_Device_net_ncd_manage::IOCtlV(u32 _CommandAddress)
for (unsigned int dev = 0; dev < 3; dev++ )
{
strncpy(ifr.ifr_name, check_devices[dev], IFNAMSIZ-1);
ret = ioctl(fd, SIOCGIFHWADDR, &ifr);
if (ret == 0)
{
INFO_LOG(WII_IPC_NET, "NET_NCD_MANAGE: IOCTLV_NCD_GETWIRELESSMACADDRESS returning local MAC address of %s", check_devices[dev]);
Memory::WriteBigEData((const u8*)ifr.ifr_hwaddr.sa_data, CommandBuffer.PayloadBuffer.at(1).m_Address, 4);
close(fd);
break;
}
}
if (ret != 0)
{
// fall back to the hardcoded address
Memory::WriteBigEData(default_address, CommandBuffer.PayloadBuffer.at(1).m_Address, 4);
}
close(fd);
// fall back to the hardcoded address
Memory::WriteBigEData(default_address, CommandBuffer.PayloadBuffer.at(1).m_Address, 4);
//#elif defined(WIN32)
// TODO