mirror of
https://github.com/mtheall/ftpd.git
synced 2024-11-23 09:39:43 +00: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__)
|
||||
@ -216,8 +210,11 @@ void FtpServer::handleNetworkLost ()
|
||||
|
||||
void FtpServer::loop ()
|
||||
{
|
||||
if (platform::networkVisible ())
|
||||
handleNetworkFound ();
|
||||
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