Fix var name and TODO comments

This commit is contained in:
Ac_K 2019-11-21 01:51:09 +01:00
commit 4afab91e9b
2 changed files with 12 additions and 11 deletions

View file

@ -7,14 +7,15 @@ namespace Ryujinx.HLE.HOS.Services.Ldn
{
internal class NetworkInterface
{
public ResultCode NetworkInterfaceState { get; set; }
public ResultCode NifmState { get; set; }
public KEvent StateChangeEvent { get; private set; }
private NetworkState _state;
public NetworkInterface(Horizon system)
{
NetworkInterfaceState = ResultCode.Success;
// TODO(Ac_K): Determine where the internal state is set.
NifmState = ResultCode.Success;
StateChangeEvent = new KEvent(system);
_state = NetworkState.None;
@ -22,7 +23,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn
public ResultCode Initialize(int unknown, int version = 0, IPAddress ipv4Address = null, IPAddress subnetMaskAddress = null)
{
// TODO: Call nn::nifm::InitializeSystem().
// TODO(Ac_K): Call nn::nifm::InitializeSystem().
// If the call failed, it returns the result code.
// If the call succeed, it signal and clear an event then start a new thread named nn.ldn.NetworkInterfaceMonitor.
@ -43,7 +44,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn
public ResultCode Finalize()
{
// TODO: Finalize nifm service then kill the thread named nn.ldn.NetworkInterfaceMonitor.
// TODO(Ac_K): Finalize nifm service then kill the thread named nn.ldn.NetworkInterfaceMonitor.
_state = NetworkState.None;

View file

@ -8,7 +8,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
{
class IUserLocalCommunicationService : IpcService
{
// TODO: Determine what the hardcoded unknown value is.
// TODO(Ac_K): Determine what the hardcoded unknown value is.
private const int UnknownValue = 90;
private NetworkInterface _networkInterface;
@ -24,7 +24,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
// GetState() -> s32 state
public ResultCode GetState(ServiceCtx context)
{
if (_networkInterface.NetworkInterfaceState != ResultCode.Success)
if (_networkInterface.NifmState != ResultCode.Success)
{
context.ResponseData.Write((int)NetworkState.Error);
@ -78,7 +78,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
// Initialize(u64 ip_addresses, u64, pid)
public ResultCode Initialize(ServiceCtx context)
{
// TODO: Determine what addresses are.
// TODO(Ac_K): Determine what addresses are.
ulong ipAddresses = context.RequestData.ReadUInt64();