Only display the verbose error message once.
authorJoshua T Corbin <jcorbin@wunjo.org>
Thu, 8 Jan 2009 23:53:00 +0000 (18:53 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Fri, 16 Jan 2009 19:47:10 +0000 (20:47 +0100)
src/core/sslserver.cpp

index 78adb82..bfcdbf2 100644 (file)
 
 #ifdef HAVE_SSL
 
+static bool SslServer_longMessShown=false;
+
 SslServer::SslServer(QObject *parent)
   : QTcpServer(parent)
 {
   if (! setCertificate(quasselDir().absolutePath() + "/quasselCert.pem")) {
-    qWarning()
-      << "SslServer: Unable to set certificate file\n"
-      << "          Quassel Core will still work, but cannot provide SSL for client connections.\n"
-      << "          Please see http://quassel-irc.org/faq/cert to learn how to enable SSL support.";
+    if (! SslServer_longMessShown) {
+      qWarning()
+        << "SslServer: Unable to set certificate file\n"
+        << "          Quassel Core will still work, but cannot provide SSL for client connections.\n"
+        << "          Please see http://quassel-irc.org/faq/cert to learn how to enable SSL support.";
+      SslServer_longMessShown=true;
+    }
   }
 }