Bug 101669

Summary: Kopete is closing down all connections and reconnects after about each 1 minute
Product: [Unmaintained] kopete Reporter: Andres Kärner <andres.karner>
Component: Connection Status PluginAssignee: Chris Howells <howells>
Status: RESOLVED FIXED    
Severity: normal CC: allan, cvdabbeele
Priority: NOR    
Version First Reported In: 0.10   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Andres Kärner 2005-03-17 09:13:14 UTC
Version:           0.10 (using KDE 3.4.0 Level "a" , unofficial build of SUSE )
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.5-7.147-default

After installing KDE 3.4 Kopete is started to close down all connections and reconnect after each 1 minute or so. Sometimes this happens even after each 20 sec. Some servers (like AIM for example) will block me after few such attempts. Other protocols are also mostly not usable :(
Comment 1 Allan Beaufour 2005-03-17 09:45:54 UTC
Yes, same thing here :(
Comment 2 Will Stephenson 2005-03-17 13:08:26 UTC
Are you using the either version of the connection status plugin?  If so please disable and try again.
Comment 3 Andres Kärner 2005-03-17 13:19:41 UTC
I know that I enabled myself long time ago "Connection status" plugin. Now I found out that there is new plugin "SuSE smpppd-enabled Connection Status" which was also enabled. So I've disabled both of them and problem seems to be gone.
Comment 4 Allan Beaufour 2005-03-17 13:24:43 UTC
Yes. I've disabled the "connection status". That did the trick! Thanks.

I've kept the "SUSE smpppd"-plugin enabled, so I do not think there's any problems with that.
Comment 5 Bruno 2005-06-08 23:06:22 UTC
Kopete 0.9.2
Same thing with Debian. No plugin activated. Yahoo deconnection.
Comment 6 Matthias Granberry 2006-04-30 05:56:18 UTC
SVN commit 535651 by granberry:

Search through the entire process output when doing the check.  When netstat took too 
long, KProcess would emit several receivedStdout signals, some of which were guaranteed
not to have "default" in them.

BUG:101669


 M  +7 -2      connectionstatusplugin.cpp  
 M  +1 -0      connectionstatusplugin.h  


--- branches/kopete/0.12/kopete/plugins/connectionstatus/connectionstatusplugin.cpp #535650:535651
@@ -60,6 +60,8 @@
 
 		return;
 	}
+
+	m_buffer = QString::null;
 	
 	// Use KProcess to run netstat -rn. We'll then parse the output of
 	// netstat -rn in slotProcessStdout() to see if it mentions the
@@ -81,8 +83,12 @@
 
 void ConnectionStatusPlugin::slotProcessExited( KProcess *process )
 {
+	kdDebug( 14301 ) << m_buffer << endl;
+
 	if ( process == m_process )
 	{
+		setConnectedStatus( m_buffer.contains( "default" ) );
+		m_buffer = QString::null;
 		delete m_process;
 		m_process = 0L;
 	}
@@ -92,9 +98,8 @@
 {
 	// Look for a default gateway
 	//kdDebug( 14301 ) << k_funcinfo << endl;
-	QString qsBuffer = QString::fromLatin1( buffer, buflen );
+	m_buffer += QString::fromLatin1( buffer, buflen );
 	//kdDebug( 14301 ) << qsBuffer << endl;
-	setConnectedStatus( qsBuffer.contains( "default" ) );
 }
 
 void ConnectionStatusPlugin::setConnectedStatus( bool connected )
--- branches/kopete/0.12/kopete/plugins/connectionstatus/connectionstatusplugin.h #535650:535651
@@ -49,6 +49,7 @@
 	bool m_pluginConnected;
 	KProcess *m_process;
 	QTimer *m_timer;
+	QString m_buffer;
 };
 
 #endif
Comment 7 Will Stephenson 2007-12-12 14:16:49 UTC
*** Bug 150536 has been marked as a duplicate of this bug. ***