Skip to content

Commit

Permalink
Don't poll wifi information from database while db save is in progress.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHae committed Mar 12, 2018
1 parent 0fc7b01 commit 08eeb11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ static int sqliteLoadConfigCallback(void *user, int ncols, char **colval , char
return 0;
}

DBG_Printf(DBG_INFO_L2, "Load config from db.\n");

bool ok;
DeRestPluginPrivate *d = static_cast<DeRestPluginPrivate*>(user);

Expand Down
6 changes: 6 additions & 0 deletions de_web_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12494,6 +12494,12 @@ void DeRestPluginPrivate::pollSwUpdateStateTimerFired()

void DeRestPluginPrivate::pollDatabaseWifiTimerFired()
{
if (saveDatabaseItems & DB_CONFIG)
{
DBG_Printf(DBG_INFO_L2, "Don't read wifi from db. Db save still in progress.\n");
return;
}

openDb();
loadWifiInformationFromDb();
closeDb();
Expand Down

0 comments on commit 08eeb11

Please sign in to comment.