Browse Source

fix logout

pull/452/head
lumapu 2 years ago
parent
commit
43af07716e
  1. 2
      src/config/config.h
  2. 2
      src/defines.h
  3. 6
      src/web/web.cpp

2
src/config/config.h

@ -26,7 +26,7 @@
//#define AP_ONLY
// timeout for automatic logoff (20 minutes)
#define LOGOUT_TIMEOUT (20 * 60 * 60)
#define LOGOUT_TIMEOUT (20 * 60)
//-------------------------------------
// CONFIGURATION - COMPILE TIME

2
src/defines.h

@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 5
#define VERSION_PATCH 40
#define VERSION_PATCH 42
//-------------------------------------
typedef struct {

6
src/web/web.cpp

@ -107,8 +107,10 @@ void web::loop(void) {
void web::tickSecond() {
if(0 != mLogoutTimeout) {
mLogoutTimeout -= 1;
if(0 == mLogoutTimeout)
mProtected = true;
if(0 == mLogoutTimeout) {
if(strlen(mConfig->sys.adminPwd) > 0)
mProtected = true;
}
DPRINTLN(DBG_DEBUG, "auto logout in " + String(mLogoutTimeout));
}

Loading…
Cancel
Save