|
@@ -3925,7 +3925,7 @@ void Core::time_out()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if((tmp_time-xfzdworktime)>86400){
|
|
|
+ if((tmp_time-xfzdworktime)>86000){
|
|
|
xfzdworktime=tmp_time;
|
|
|
for(int i=0;i<XfzdDevList.length();i++){
|
|
|
time_t tmp_time = time(static_cast<time_t *>(nullptr));
|
|
@@ -4406,11 +4406,13 @@ void Core::time_out()
|
|
|
}
|
|
|
if(sqlList2.length()>0){
|
|
|
QSqlDatabase recdb;
|
|
|
- if(QSqlDatabase::contains("rec_db"))
|
|
|
+ if(QSqlDatabase::contains("rec_db")){
|
|
|
recdb = QSqlDatabase::database("rec_db");
|
|
|
- else
|
|
|
+ }else{
|
|
|
recdb = QSqlDatabase::addDatabase("QSQLITE","rec_db");
|
|
|
- recdb.setDatabaseName(QString("db/watchdoglog%1.db").arg(QDate::currentDate().toString("yyyyMMdd")));
|
|
|
+ }
|
|
|
+ QString name = QString("db/watchdoglog%1.db").arg(QDate::currentDate().toString("yyyyMMdd"));
|
|
|
+ recdb.setDatabaseName(name);
|
|
|
if(recdb.open()){
|
|
|
if(!chk_table("ypsync_t_rec",recdb.tables()))
|
|
|
{
|