From e5b84abb18c6419d24d807bd6f84ce44be172385 Mon Sep 17 00:00:00 2001 From: esainane Date: Sat, 21 Nov 2015 21:38:11 +1300 Subject: [PATCH] Fix OIdentdConfigGenerator double-printing on ssl connected() is always connected to socketInitialized(). encrypted() is also connected to socketInitialized() when ssl is enabled. socketInitialized() fires socketOpen(...) unconditionally, but does not fire socketInitialized(...) if we're using SSL without encryption yet - see line 464. With socketOpen(...) connected to OIdentdConfigurationGenerator::addSocket, OIdentdConfigurationGenerator writes to .oidentd.conf twice for every connection. Changing this to have socketInitialized(...) connected instead prevents this duplication. --- src/core/corenetwork.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index 942e32f6..c42325f9 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -81,7 +81,7 @@ CoreNetwork::CoreNetwork(const NetworkId &networkid, CoreSession *session) connect(this, SIGNAL(newEvent(Event *)), coreSession()->eventManager(), SLOT(postEvent(Event *))); if (Quassel::isOptionSet("oidentd")) { - connect(this, SIGNAL(socketOpen(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16)), Core::instance()->oidentdConfigGenerator(), SLOT(addSocket(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16)), Qt::BlockingQueuedConnection); + 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))); } } -- 2.20.1