[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r4082: Ignore CLOCK_SKEW status events whose source starts with "OR (vidalia/trunk/src/vidalia/log)



Author: edmanm
Date: 2009-08-28 20:46:31 -0400 (Fri, 28 Aug 2009)
New Revision: 4082

Modified:
   vidalia/trunk/src/vidalia/log/StatusEventWidget.cpp
Log:

Ignore CLOCK_SKEW status events whose source starts with "OR:" if the
currently running Tor is 0.2.1.19 or earlier or 0.2.2.1 or earlier.


Modified: vidalia/trunk/src/vidalia/log/StatusEventWidget.cpp
===================================================================
--- vidalia/trunk/src/vidalia/log/StatusEventWidget.cpp	2009-08-28 22:44:50 UTC (rev 4081)
+++ vidalia/trunk/src/vidalia/log/StatusEventWidget.cpp	2009-08-29 00:46:31 UTC (rev 4082)
@@ -213,22 +213,32 @@
 void
 StatusEventWidget::clockSkewed(int skew, const QString &source)
 {
-  Q_UNUSED(source);
+  if (source.startsWith("OR:", Qt::CaseInsensitive)) {
+    // Tor versions 0.2.1.19 and earlier, and 0.2.2.1 and earlier, throw
+    // this message a little too liberally in this case.
+    quint32 torVersion = Vidalia::torControl()->getTorVersion();
+    if (torVersion <= 0x00020113)
+      return;
+    QString str = Vidalia::torControl()->getTorVersionString();
+    if (str.startsWith("0.2.2.") && torVersion <= 0x00020201)
+      return;
+  }
+
   QString description;
   QPixmap icon = addBadgeToPixmap(QPixmap(":/images/48x48/chronometer.png"),
                                   QPixmap(":/images/48x48/dialog-warning.png"));
-  
+
   if (skew < 0) {
     description = 
       tr("Tor has determined that your computer's clock may be set to %1 "
-         "seconds in the past compared to the directory server at %2. If your "
+         "seconds in the past compared to the source \"%2\". If your "
          "clock is not correct, Tor will not be able to function. Please "
          "verify your computer displays the correct time.").arg(qAbs(skew))
                                                            .arg(source);
   } else {
     description = 
       tr("Tor has determined th at your computer's clock may be set to %1 "
-         "seconds in the future compared to the directory server at %2. If "
+         "seconds in the future compared to the source \"%2\". If "
          "your clock is not correct, Tor will not be able to function. Please "
          "verify your computer displays the correct time.").arg(qAbs(skew))
                                                            .arg(source);