X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.cpp;h=552662a79831613867457c67a2f4517f100ae377;hp=80986f0696f0243a5a99b77d4cec3f064653e619;hb=02666f58f85f8c8a127804716e7df2d52d1e273c;hpb=13db1eb09783ab2220c6609844ef32ad0be75945;ds=sidebyside diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index 80986f06..552662a7 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -82,7 +82,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(socketInitialized(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16)), Core::instance()->oidentdConfigGenerator(), SLOT(addSocket(const CoreIdentity*, QHostAddress, quint16, QHostAddress, quint16)), Qt::BlockingQueuedConnection); + connect(this, SIGNAL(socketConnected(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))); } } @@ -444,6 +444,15 @@ void CoreNetwork::socketError(QAbstractSocket::SocketError error) void CoreNetwork::socketInitialized() { + CoreIdentity *identity = identityPtr(); + if (!identity) { + qCritical() << "Identity invalid!"; + disconnectFromIrc(); + return; + } + + emit socketConnected(identity, localAddress(), localPort(), peerAddress(), peerPort()); + Server server = usedServer(); #ifdef HAVE_SSL if (server.useSsl && !socket.isEncrypted()) @@ -452,12 +461,6 @@ void CoreNetwork::socketInitialized() #if QT_VERSION >= 0x040600 socket.setSocketOption(QAbstractSocket::KeepAliveOption, true); #endif - CoreIdentity *identity = identityPtr(); - if (!identity) { - qCritical() << "Identity invalid!"; - disconnectFromIrc(); - return; - } emit socketInitialized(identity, localAddress(), localPort(), peerAddress(), peerPort());