fix error in extscript and extupgrade with invalid updates interval if X-AW-Interval=1

This commit is contained in:
Evgenii Alekseev 2016-05-21 14:36:24 +03:00
parent e71da9bdfb
commit 2dccc92933
2 changed files with 8 additions and 4 deletions

View File

@ -271,9 +271,11 @@ QVariantHash ExtScript::run()
cmdList.append(m_executable); cmdList.append(m_executable);
qCInfo(LOG_LIB) << "Run cmd" << cmdList.join(QChar(' ')); qCInfo(LOG_LIB) << "Run cmd" << cmdList.join(QChar(' '));
process->start(cmdList.join(QChar(' '))); process->start(cmdList.join(QChar(' ')));
} else if (times >= interval()) {
times = 0;
} }
// update value
if (times >= interval())
times = 0;
times++; times++;
return value; return value;

View File

@ -149,9 +149,11 @@ QVariantHash ExtUpgrade::run()
QString cmd = QString("sh -c \"%1\"").arg(m_executable); QString cmd = QString("sh -c \"%1\"").arg(m_executable);
qCInfo(LOG_LIB) << "Run cmd" << cmd; qCInfo(LOG_LIB) << "Run cmd" << cmd;
process->start(cmd); process->start(cmd);
} else if (times >= interval()) {
times = 0;
} }
// update value
if (times >= interval())
times = 0;
times++; times++;
return value; return value;