[PATCH] (issue177) Only install certificate lists which are newer

Wald Commits scm-commit at wald.intevation.org
Wed Nov 19 19:08:01 CET 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1416420476 -3600
# Node ID c2b76c8a8b82d87c26cd5bdcd476e93cde6f6eab
# Parent  0f3af691639554e3caa80408e58da57271d7001a
(issue177) Only install certificate lists which are newer

diff -r 0f3af6916395 -r c2b76c8a8b82 ui/mainwindow.cpp
--- a/ui/mainwindow.cpp	Mon Nov 10 14:01:23 2014 +0100
+++ b/ui/mainwindow.cpp	Wed Nov 19 19:07:56 2014 +0100
@@ -306,13 +306,19 @@
     mSettings.setValue("List/availableDate", modDate);
 
     verifyListData();
-    if (!mListToInstall.isValid()) {
+    if (!mListToInstall.isValid() || mListToInstall.date() <= mInstalledList.date()) {
+        if ( mListToInstall.date() <= mInstalledList.date()) {
+            qDebug() << "Newest list on the server is older then the installed list. ";
+            qDebug() << "Installed: " << mInstalledList.date();
+            qDebug() << "Available: " << mListToInstall.date();
+        } else {
+            qDebug() << "Failed to verify list.";
+        }
         handleLTE(lteInvalidList);
         /* Downloader provided invalid files */
 
         /* Retry the download again in 10 - 20 minutes */
         QTimer::singleShot(600000 + (qrand() % 60000), this, SLOT(checkUpdates()));
-        qDebug() << "Failed to verify list.";
     } else {
         if (mTrayIcon->isAlternative()) {
             mCurMessage = tr("An updated certificate list is available.");


More information about the Trustbridge-commits mailing list