mirror of
https://github.com/wiiu-env/ftpiiu_plugin.git
synced 2024-12-23 11:21:49 +01:00
Initialize nifm session for network check
This commit is contained in:
parent
49b2571336
commit
7591a39cfd
@ -165,12 +165,6 @@ std::time_t FtpServer::startTime ()
|
|||||||
|
|
||||||
void FtpServer::handleNetworkFound ()
|
void FtpServer::handleNetworkFound ()
|
||||||
{
|
{
|
||||||
{
|
|
||||||
auto lock = std::scoped_lock (m_lock);
|
|
||||||
if (m_socket)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct sockaddr_in addr;
|
struct sockaddr_in addr;
|
||||||
addr.sin_family = AF_INET;
|
addr.sin_family = AF_INET;
|
||||||
#if defined(_3DS) || defined(__SWITCH__)
|
#if defined(_3DS) || defined(__SWITCH__)
|
||||||
@ -215,9 +209,12 @@ void FtpServer::handleNetworkLost ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FtpServer::loop ()
|
void FtpServer::loop ()
|
||||||
|
{
|
||||||
|
if (!m_socket)
|
||||||
{
|
{
|
||||||
if (platform::networkVisible ())
|
if (platform::networkVisible ())
|
||||||
handleNetworkFound ();
|
handleNetworkFound ();
|
||||||
|
}
|
||||||
|
|
||||||
// poll listen socket
|
// poll listen socket
|
||||||
if (m_socket)
|
if (m_socket)
|
||||||
|
@ -56,6 +56,7 @@ void userAppInit ()
|
|||||||
|
|
||||||
romfsInit ();
|
romfsInit ();
|
||||||
plInitialize ();
|
plInitialize ();
|
||||||
|
nifmInitialize (NifmServiceType_User);
|
||||||
|
|
||||||
if (R_FAILED (socketInitialize (&s_socketInitConfig)))
|
if (R_FAILED (socketInitialize (&s_socketInitConfig)))
|
||||||
return;
|
return;
|
||||||
@ -76,6 +77,7 @@ void userAppExit ()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
nifmExit ();
|
||||||
plExit ();
|
plExit ();
|
||||||
romfsExit ();
|
romfsExit ();
|
||||||
appletUnlockExit ();
|
appletUnlockExit ();
|
||||||
|
Loading…
Reference in New Issue
Block a user