From f38c975dc6fb7d7c1842be242809e130f6a5e52f Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Fri, 6 Oct 2023 12:57:38 +0200 Subject: [PATCH] Remove check for which parent has started atbupdatetool: it is always systemd now. --- update.cpp | 59 +----------------------------------------------------- 1 file changed, 1 insertion(+), 58 deletions(-) diff --git a/update.cpp b/update.cpp index 2e9e8d2..4ecbffa 100644 --- a/update.cpp +++ b/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::const_iterator it; for (it = filesToWorkOn.cbegin(); it != filesToWorkOn.cend(); ++it) {