[Konversation-devel] [Bug 241362] Disconnecting wlan prompts Konversation to terminate *localhost* connections aswell

Peter Simonsson peter.simonsson at gmail.com
Fri Jul 16 21:13:22 CEST 2010


https://bugs.kde.org/show_bug.cgi?id=241362


Peter Simonsson <peter.simonsson at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Peter Simonsson <peter simonsson gmail com>  2010-07-16 21:13:21 ---
commit 631fa7e7264e843c1a202d0343e6ff965209256b
Author: Peter Simonsson <peter.simonsson at gmail.com>
Date:   Fri Jul 16 21:12:48 2010 +0200

    Ignore network up/down notifications for localhost connections.

    I'm sure I've missed something in this simple implementation, but it
    works for me<tm>

    BUG:241362

diff --git a/src/irc/server.cpp b/src/irc/server.cpp
index b4a70aa..89c25c3 100644
--- a/src/irc/server.cpp
+++ b/src/irc/server.cpp
@@ -3966,7 +3966,8 @@ void Server::sendChannelNickChangedSignals()

 void Server::involuntaryQuit()
 {
-    if(m_connectionState == Konversation::SSConnected || m_connectionState ==
Konversation::SSConnecting)
+    if((m_connectionState == Konversation::SSConnected || m_connectionState ==
Konversation::SSConnecting) &&
+       (m_socket->peerAddress() != QHostAddress(QHostAddress::LocalHost) &&
m_socket->peerAddress() != QHostAddress(QHostAddress::LocalHostIPv6)))
     {
         quitServer();
         updateConnectionState(Konversation::SSInvoluntarilyDisconnected);

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Konversation-devel mailing list