Remove check for which parent has started atbupdatetool: it is always
systemd now.
This commit is contained in:
parent
fba007aa35
commit
f38c975dc6
59
update.cpp
59
update.cpp
@ -742,64 +742,7 @@ QStringList Update::getDcSoftAndHardWareVersion() {
|
||||
}
|
||||
|
||||
bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
|
||||
// 04.10.2023: deactivated -> first testing of opkg_commands
|
||||
//
|
||||
// wird auch nie wieder gebraucht, da alles von der dc-lib erledigt wird.
|
||||
// die dc-lib braucht dazu nur datei-namen.
|
||||
return true;
|
||||
|
||||
|
||||
bool serialOpened = false;
|
||||
|
||||
QString const &parentName = Utils::getParentName();
|
||||
|
||||
Utils::printInfoMsg(
|
||||
QString("PARENT OF ATB-UPDATE-TOOL (ppid=%1) ").arg(getppid()) + parentName);
|
||||
|
||||
if (parentName == "ATBQT" || parentName == "systemd") {
|
||||
// the tool was not called during 'service' ot during an automatic
|
||||
// update procedure. and it was called explicitly with libCAmaster.so
|
||||
if (m_pluginName.contains("master", Qt::CaseInsensitive)) {
|
||||
Utils::printCriticalErrorMsg(parentName
|
||||
+ " IS MASTER, BUT ATB-UPDATE-TOOL CALLED WITH libCAmaster.so");
|
||||
return false;
|
||||
}
|
||||
Utils::printInfoMsg(
|
||||
QString("ATB-UPDATE-TOOL STARTED AS SLAVE OF ") + parentName);
|
||||
} else
|
||||
if (Utils::isATBQTRunning()) { // manual testing
|
||||
if (m_pluginName.contains("master", Qt::CaseInsensitive)) {
|
||||
Utils::printCriticalErrorMsg(
|
||||
"ATBQT IS MASTER, BUT ATB-UPDATE-TOOL CALLED WITH libCAmaster.so");
|
||||
return false;
|
||||
}
|
||||
Utils::printInfoMsg(
|
||||
"ATB-UPDATE-TOOL STARTED AS SLAVE-SIBLING OF ATBQT-MASTER");
|
||||
} else {
|
||||
if (m_pluginName.contains("slave", Qt::CaseInsensitive)) {
|
||||
Utils::printCriticalErrorMsg(
|
||||
"ATB-UPDATE-TOOL CALLED WITH libCAslave.so ALTHOUGH MASTER");
|
||||
return false;
|
||||
}
|
||||
Utils::printInfoMsg("ATB-UPDATE-TOOL STARTED AS MASTER");
|
||||
|
||||
if ((serialOpened = openSerial(baudrateMap.value(m_baudrate),
|
||||
m_baudrate,
|
||||
m_serialInterface)) == false) {
|
||||
Utils::printCriticalErrorMsg(
|
||||
QString("CANNOT OPEN ")
|
||||
+ m_serialInterface
|
||||
+ "( BAUDRATE=" + m_baudrate + ")");
|
||||
return false;
|
||||
}
|
||||
|
||||
m_hw->dc_autoRequest(false);
|
||||
|
||||
Utils::printInfoMsg(
|
||||
QString("SERIAL OPEN ") + m_serialInterface
|
||||
+ " (BAUDRATE=" + m_baudrate + ")");
|
||||
}
|
||||
|
||||
// always assume that serial line is open
|
||||
bool res = false;
|
||||
QList<QString>::const_iterator it;
|
||||
for (it = filesToWorkOn.cbegin(); it != filesToWorkOn.cend(); ++it) {
|
||||
|
Loading…
Reference in New Issue
Block a user