X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.cpp;h=3d20faf4b6c783f590d6c43020d923d14d586c02;hp=b43bbc29eaa65aaa83c9b785a861573e9b01efc8;hb=2e80003ab40313767d0624e05533a62e2eee387b;hpb=f9a73e3ad8142212028a39b26ced62456e575b7a diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index b43bbc29..3d20faf4 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -79,8 +79,10 @@ CoreNetwork::CoreNetwork(const NetworkId &networkid, CoreSession *session) #endif connect(this, SIGNAL(newEvent(Event *)), coreSession()->eventManager(), SLOT(postEvent(Event *))); - if(Quassel::isOptionSet("oidentd")) - connect(this, SIGNAL(newSocket(const CoreIdentity*,QHostAddress,quint16,QHostAddress,quint16)), Core::instance()->oidentdConfigGenerator(), SLOT(addSocket(const CoreIdentity*,QHostAddress,quint16,QHostAddress,quint16))); + 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))); + connect(this, SIGNAL(socketDisconnected(const CoreIdentity*,QHostAddress,quint16,QHostAddress,quint16)), Core::instance()->oidentdConfigGenerator(), SLOT(removeSocket(const CoreIdentity*,QHostAddress,quint16,QHostAddress,quint16))); + } } CoreNetwork::~CoreNetwork() { @@ -367,7 +369,7 @@ qDebug() << "connected()"; return; } - emit newSocket(identity, localAddress(), localPort(), peerAddress(), peerPort()); + emit socketInitialized(identity, localAddress(), localPort(), peerAddress(), peerPort()); // TokenBucket to avoid sending too much at once _messageDelay = 2200; // this seems to be a safe value (2.2 seconds delay) @@ -413,6 +415,7 @@ void CoreNetwork::socketDisconnected() { setConnected(false); emit disconnected(networkId()); + emit socketDisconnected(identityPtr(), localAddress(), localPort(), peerAddress(), peerPort()); if(_quitRequested) { _quitRequested = false; setConnectionState(Network::Disconnected);