core: Fix oidentd signal connection, cleanup
authorShane Synan <digitalcircuit36939@gmail.com>
Tue, 19 Jun 2018 02:58:41 +0000 (21:58 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 19 Jun 2018 22:01:33 +0000 (00:01 +0200)
Update OidentdConfigGenerator signal connections, adding the missing
socketId added in commit 41b9d689945e784b160a25d12076600ff4b7ae90 .

This fixes a warning about signals/slots not matching up.

Thanks to @genius3000 for finding this issue!

Clean up line length and spacing while we're here.

src/core/corenetwork.cpp
src/core/oidentdconfiggenerator.cpp
src/core/oidentdconfiggenerator.h

index d3c4645..d7d259b 100644 (file)
@@ -100,13 +100,17 @@ CoreNetwork::CoreNetwork(const NetworkId &networkid, CoreSession *session)
     connect(this, SIGNAL(capRemoved(QString)), this, SLOT(serverCapRemoved(QString)));
 
     if (Quassel::isOptionSet("oidentd")) {
-        connect(this, SIGNAL(socketInitialized(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16)), Core::instance()->oidentdConfigGenerator(), SLOT(addSocket(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16)), Qt::BlockingQueuedConnection);
-        connect(this, SIGNAL(socketDisconnected(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16)), Core::instance()->oidentdConfigGenerator(), SLOT(removeSocket(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16)));
+        connect(this, SIGNAL(socketInitialized(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16, qint64)),
+                Core::instance()->oidentdConfigGenerator(), SLOT(addSocket(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16, qint64)), Qt::BlockingQueuedConnection);
+        connect(this, SIGNAL(socketDisconnected(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16, qint64)),
+                Core::instance()->oidentdConfigGenerator(), SLOT(removeSocket(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16, qint64)));
     }
 
     if (Quassel::isOptionSet("ident-daemon")) {
-        connect(this, SIGNAL(socketInitialized(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16, qint64)), Core::instance()->identServer(), SLOT(addSocket(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16, qint64)), Qt::BlockingQueuedConnection);
-        connect(this, SIGNAL(socketDisconnected(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16, qint64)), Core::instance()->identServer(), SLOT(removeSocket(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16, qint64)));
+        connect(this, SIGNAL(socketInitialized(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16, qint64)),
+                Core::instance()->identServer(), SLOT(addSocket(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16, qint64)), Qt::BlockingQueuedConnection);
+        connect(this, SIGNAL(socketDisconnected(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16, qint64)),
+                Core::instance()->identServer(), SLOT(removeSocket(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16, qint64)));
     }
 }
 
index c1bd71a..76a2c06 100644 (file)
@@ -76,9 +76,16 @@ QString OidentdConfigGenerator::sysIdentForIdentity(const CoreIdentity *identity
 }
 
 
-bool OidentdConfigGenerator::addSocket(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort)
+bool OidentdConfigGenerator::addSocket(const CoreIdentity *identity,
+                                       const QHostAddress &localAddress, quint16 localPort,
+                                       const QHostAddress &peerAddress, quint16 peerPort,
+                                       qint64 socketId)
 {
-    Q_UNUSED(localAddress) Q_UNUSED(peerAddress) Q_UNUSED(peerPort)
+    Q_UNUSED(localAddress)
+    Q_UNUSED(peerAddress)
+    Q_UNUSED(peerPort)
+    Q_UNUSED(socketId)
+
     const QString ident = sysIdentForIdentity(identity);
 
     _quasselConfig.append(_quasselStanzaTemplate.arg(localPort).arg(ident).arg(_configTag).toLatin1());
@@ -90,9 +97,18 @@ bool OidentdConfigGenerator::addSocket(const CoreIdentity *identity, const QHost
 
 
 //! not yet implemented
-bool OidentdConfigGenerator::removeSocket(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort)
+bool OidentdConfigGenerator::removeSocket(const CoreIdentity *identity,
+                                          const QHostAddress &localAddress, quint16 localPort,
+                                          const QHostAddress &peerAddress, quint16 peerPort,
+                                          qint64 socketId)
 {
-    Q_UNUSED(identity) Q_UNUSED(localAddress) Q_UNUSED(localPort) Q_UNUSED(peerAddress) Q_UNUSED(peerPort)
+    Q_UNUSED(identity)
+    Q_UNUSED(localAddress)
+    Q_UNUSED(localPort)
+    Q_UNUSED(peerAddress)
+    Q_UNUSED(peerPort)
+    Q_UNUSED(socketId)
+
     return true;
 }
 
index bfd351f..790d85b 100644 (file)
@@ -63,8 +63,12 @@ public:
     ~OidentdConfigGenerator();
 
 public slots:
-    bool addSocket(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort);
-    bool removeSocket(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort);
+    bool addSocket(const CoreIdentity *identity, const QHostAddress &localAddress,
+                   quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort,
+                   qint64 socketId);
+    bool removeSocket(const CoreIdentity *identity, const QHostAddress &localAddress,
+                      quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort,
+                      qint64 socketId);
 
 private:
     QString sysIdentForIdentity(const CoreIdentity *identity) const;