mirror of
https://github.com/wiiu-env/ftpiiu_plugin.git
synced 2024-12-23 03:11: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 ()
|
||||
{
|
||||
{
|
||||
auto lock = std::scoped_lock (m_lock);
|
||||
if (m_socket)
|
||||
return;
|
||||
}
|
||||
|
||||
struct sockaddr_in addr;
|
||||
addr.sin_family = AF_INET;
|
||||
#if defined(_3DS) || defined(__SWITCH__)
|
||||
@ -215,9 +209,12 @@ void FtpServer::handleNetworkLost ()
|
||||
}
|
||||
|
||||
void FtpServer::loop ()
|
||||
{
|
||||
if (!m_socket)
|
||||
{
|
||||
if (platform::networkVisible ())
|
||||
handleNetworkFound ();
|
||||
}
|
||||
|
||||
// poll listen socket
|
||||
if (m_socket)
|
||||
|
@ -56,6 +56,7 @@ void userAppInit ()
|
||||
|
||||
romfsInit ();
|
||||
plInitialize ();
|
||||
nifmInitialize (NifmServiceType_User);
|
||||
|
||||
if (R_FAILED (socketInitialize (&s_socketInitConfig)))
|
||||
return;
|
||||
@ -76,6 +77,7 @@ void userAppExit ()
|
||||
}
|
||||
#endif
|
||||
|
||||
nifmExit ();
|
||||
plExit ();
|
||||
romfsExit ();
|
||||
appletUnlockExit ();
|
||||
|
Loading…
Reference in New Issue
Block a user