rpms/kdenetwork/F-9 kdenetwork-4.1.3-kde#172011-kopete-crash-logout.patch, NONE, 1.1 kdenetwork-4.1.3-kde#172985-kopete-crash-accounts.patch, NONE, 1.1 kdenetwork-4.1.3-kde#172997-kopete-crash-login.patch, NONE, 1.1 kdenetwork.spec, 1.154, 1.155

Lukas Tinkl ltinkl at fedoraproject.org
Mon Oct 20 11:07:51 UTC 2008


Author: ltinkl

Update of /cvs/extras/rpms/kdenetwork/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31273

Modified Files:
	kdenetwork.spec 
Added Files:
	kdenetwork-4.1.3-kde#172011-kopete-crash-logout.patch 
	kdenetwork-4.1.3-kde#172985-kopete-crash-accounts.patch 
	kdenetwork-4.1.3-kde#172997-kopete-crash-login.patch 
Log Message:
backport several crash fixes for Kopete


kdenetwork-4.1.3-kde#172011-kopete-crash-logout.patch:

--- NEW FILE kdenetwork-4.1.3-kde#172011-kopete-crash-logout.patch ---
Index: kopete/libkopete/kopetepluginmanager.cpp
===================================================================
--- kopete/libkopete/kopetepluginmanager.cpp	(revision 869874)
+++ kopete/libkopete/kopetepluginmanager.cpp	(revision 869875)
@@ -245,6 +245,10 @@
 {
 	kDebug( 14010 ) ;
 
+	// Disconnect any remaining plugins (bug 172011).
+	for ( PluginManagerPrivate::InfoToPluginMap::ConstIterator it = _kpmp->loadedPlugins.begin(); it != _kpmp->loadedPlugins.end(); ++it )
+		disconnect( it.value(), SIGNAL(destroyed(QObject*)), this, 0 );
+
 	_kpmp->shutdownMode = PluginManagerPrivate::DoneShutdown;
 
 	KGlobal::deref();

kdenetwork-4.1.3-kde#172985-kopete-crash-accounts.patch:

--- NEW FILE kdenetwork-4.1.3-kde#172985-kopete-crash-accounts.patch ---
Index: kopete/libkopete/kopeteaccount.cpp
===================================================================
--- kopete/libkopete/kopeteaccount.cpp	(revision 872279)
+++ kopete/libkopete/kopeteaccount.cpp	(revision 872280)
@@ -515,8 +515,10 @@
 	QHashIterator<QString, Contact*> it(d->contacts);
 	for (  ; it.hasNext(); ) {
 		it.next();
-		if ( it.value() != d->myself )
-			it.value()->setOnlineStatus( status );
+
+		Contact *c = it.value();
+		if ( c && c != d->myself )
+			c->setOnlineStatus( status );
 	}
 }
 

kdenetwork-4.1.3-kde#172997-kopete-crash-login.patch:

--- NEW FILE kdenetwork-4.1.3-kde#172997-kopete-crash-login.patch ---
Index: kopete/protocols/oscar/liboscar/client.cpp
===================================================================
--- kopete/protocols/oscar/liboscar/client.cpp	(revision 872808)
+++ kopete/protocols/oscar/liboscar/client.cpp	(revision 872809)
@@ -21,10 +21,11 @@
 
 #include "client.h"
 
-#include <qtimer.h>
+#include <QTimer>
 #include <QList>
 #include <QByteArray>
-#include <qtextcodec.h>
+#include <QPointer>
+#include <QTextCodec>
 #include <QtNetwork/QTcpSocket>
 
 #include <kdebug.h> //for kDebug()
@@ -104,6 +105,9 @@
 	enum { StageOne, StageTwo };
 	int stage;
 
+	StageOneLoginTask* loginTask;
+	QPointer<StageTwoLoginTask> loginTaskTwo;
+
 	//Protocol specific data
 	bool isIcq;
 	bool redirectRequested;
@@ -161,8 +165,6 @@
 :QObject( parent )
 {
 	setObjectName( "oscarclient" );
-	m_loginTask = 0L;
-	m_loginTaskTwo = 0L;
 
 	d = new ClientPrivate;
 	d->tzoffset = 0;
@@ -185,6 +187,8 @@
 	d->icqTlvInfoTask = 0L;
 	d->userInfoTask = 0L;
 	d->stage = ClientPrivate::StageOne;
+	d->loginTask = 0L;
+	d->loginTaskTwo = 0L;
 	d->typingNotifyTask = 0L;
 	d->ssiModifyTask = 0L;
 	d->awayMsgRequestTimer = new QTimer();
@@ -218,8 +222,8 @@
 	d->connections.append( c );
 	if ( auth == true )
 	{
-		m_loginTask = new StageOneLoginTask( c->rootTask() );
-		connect( m_loginTask, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) );
+		d->loginTask = new StageOneLoginTask( c->rootTask() );
+		connect( d->loginTask, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) );
 	}
 
 	connect( c, SIGNAL( socketError( int, const QString& ) ), this, SLOT( determineDisconnection( int, const QString& ) ) );
@@ -230,6 +234,10 @@
 {
 	Q_UNUSED( host );
 	Q_UNUSED( port );
+
+	// Cleanup client
+	close();
+
 	d->user = userId;
 	d->pass = pass;
 	d->stage = ClientPrivate::StageOne;
@@ -246,6 +254,7 @@
 	d->awayMsgRequestTimer->stop();
 	d->awayMsgRequestQueue.clear();
 	d->connections.clear();
+
 	deleteStaticTasks();
 
 	//don't clear the stored status between stage one and two
@@ -381,9 +390,8 @@
 void Client::streamConnected()
 {
 	kDebug(OSCAR_RAW_DEBUG) ;
-	d->stage = ClientPrivate::StageTwo;
-	if ( m_loginTaskTwo )
-		m_loginTaskTwo->go();
+	if ( d->loginTaskTwo )
+		d->loginTaskTwo->go( Task::AutoDelete );
 }
 
 void Client::lt_loginFinished()
@@ -399,33 +407,31 @@
 		ServiceSetupTask* ssTask = new ServiceSetupTask( d->connections.defaultConnection()->rootTask() );
 		connect( ssTask, SIGNAL( finished() ), this, SLOT( serviceSetupFinished() ) );
 		ssTask->go( Task::AutoDelete ); //fire and forget
-		m_loginTaskTwo->deleteLater();
-		m_loginTaskTwo = 0;
 	}
 	else if ( d->stage == ClientPrivate::StageOne )
 	{
 		kDebug(OSCAR_RAW_DEBUG) << "stage one login done";
-		disconnect( m_loginTask, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) );
+		disconnect( d->loginTask, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) );
 
-		if ( m_loginTask->statusCode() == 0 ) //we can start stage two
+		if ( d->loginTask->statusCode() == 0 ) //we can start stage two
 		{
 			kDebug(OSCAR_RAW_DEBUG) << "no errors from stage one. moving to stage two";
 
 			//cache these values since they'll be deleted when we close the connections (which deletes the tasks)
-			d->host = m_loginTask->bosServer();
-			d->port = m_loginTask->bosPort().toUInt();
-			d->cookie = m_loginTask->loginCookie();
+			d->host = d->loginTask->bosServer();
+			d->port = d->loginTask->bosPort().toUInt();
+			d->cookie = d->loginTask->loginCookie();
 			close();
 			QTimer::singleShot( 100, this, SLOT(startStageTwo() ) );
+			d->stage = ClientPrivate::StageTwo;
 		}
 		else
 		{
 			kDebug(OSCAR_RAW_DEBUG) << "errors reported. not moving to stage two";
 			close(); //deletes the connections for us
 		}
-
-		m_loginTask->deleteLater();
-		m_loginTask = 0;
+		d->loginTask->deleteLater();
+		d->loginTask = 0;
 	}
 
 }
@@ -437,11 +443,10 @@
 	new CloseConnectionTask( c->rootTask() );
 
 	//create the new login task
-	m_loginTaskTwo = new StageTwoLoginTask( c->rootTask() );
-	m_loginTaskTwo->setCookie( d->cookie );
-	QObject::connect( m_loginTaskTwo, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) );
+	d->loginTaskTwo = new StageTwoLoginTask( c->rootTask() );
+	d->loginTaskTwo->setCookie( d->cookie );
+	QObject::connect( d->loginTaskTwo, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) );
 
-
 	//connect
 	QObject::connect( c, SIGNAL( connected() ), this, SLOT( streamConnected() ) );
 	connectToServer( c, d->host, d->port, false ) ;
@@ -1518,9 +1523,9 @@
 
 	Connection* c = createConnection();
 	//create the new login task
-	m_loginTaskTwo = new StageTwoLoginTask( c->rootTask() );
-	m_loginTaskTwo->setCookie( cookie );
-	QObject::connect( m_loginTaskTwo, SIGNAL( finished() ), this, SLOT( serverRedirectFinished() ) );
+	d->loginTaskTwo = new StageTwoLoginTask( c->rootTask() );
+	d->loginTaskTwo->setCookie( cookie );
+	QObject::connect( d->loginTaskTwo, SIGNAL( finished() ), this, SLOT( serverRedirectFinished() ) );
 
 	//connect
 	connectToServer( c, realHost, realPort.toInt(), false );
@@ -1532,7 +1537,9 @@
 
 void Client::serverRedirectFinished()
 {
-	if ( m_loginTaskTwo &&  m_loginTaskTwo->statusCode() == 0 )
+	StageTwoLoginTask* loginTaskTwo = qobject_cast<StageTwoLoginTask*>( sender() );
+
+	if ( loginTaskTwo && loginTaskTwo->statusCode() == 0 )
 	{ //stage two was successful
 		Connection* c = d->connections.connectionForFamily( d->currentRedirect );
 		if ( !c )
@@ -1555,33 +1562,33 @@
 		emit chatNavigationConnected();
 	}
 
-    if ( d->currentRedirect == 0x000E )
-    {
-        //HACK! such abuse! think of a better way
-        if ( !m_loginTaskTwo )
-        {
-            kWarning(OSCAR_RAW_DEBUG) << "no login task to get connection from!";
-            emit redirectionFinished( d->currentRedirect );
-            return;
-        }
-
-        Connection* c = m_loginTaskTwo->client();
-        QString roomName = d->connections.chatRoomForConnection( c );
-        Oscar::WORD exchange = d->connections.exchangeForConnection( c );
-        if ( c )
-        {
-            kDebug(OSCAR_RAW_DEBUG) << "setting up chat connection";
-            ChatServiceTask* cst = new ChatServiceTask( c->rootTask(), exchange, roomName );
-            connect( cst, SIGNAL( userJoinedChat( Oscar::Oscar::WORD, const QString&, const QString& ) ),
-                     this, SIGNAL( userJoinedChat( Oscar::Oscar::WORD, const QString&, const QString& ) ) );
-            connect( cst, SIGNAL( userLeftChat( Oscar::Oscar::WORD, const QString&, const QString& ) ),
-                     this, SIGNAL( userLeftChat( Oscar::Oscar::WORD, const QString&, const QString& ) ) );
-            connect( cst, SIGNAL( newChatMessage( const Oscar::Message& ) ),
-                     this, SIGNAL( messageReceived( const Oscar::Message& ) ) );
-        }
-        emit chatRoomConnected( exchange, roomName );
-    }
-
+	if ( d->currentRedirect == 0x000E )
+	{
+		//HACK! such abuse! think of a better way
+		if ( !loginTaskTwo )
+		{
+			kWarning(OSCAR_RAW_DEBUG) << "no login task to get connection from!";
+			emit redirectionFinished( d->currentRedirect );
+			return;
+		}
+	
+		Connection* c = loginTaskTwo->client();
+		QString roomName = d->connections.chatRoomForConnection( c );
+		Oscar::WORD exchange = d->connections.exchangeForConnection( c );
+		if ( c )
+		{
+			kDebug(OSCAR_RAW_DEBUG) << "setting up chat connection";
+			ChatServiceTask* cst = new ChatServiceTask( c->rootTask(), exchange, roomName );
+			connect( cst, SIGNAL( userJoinedChat( Oscar::Oscar::WORD, const QString&, const QString& ) ),
+			         this, SIGNAL( userJoinedChat( Oscar::Oscar::WORD, const QString&, const QString& ) ) );
+			connect( cst, SIGNAL( userLeftChat( Oscar::Oscar::WORD, const QString&, const QString& ) ),
+			         this, SIGNAL( userLeftChat( Oscar::Oscar::WORD, const QString&, const QString& ) ) );
+			connect( cst, SIGNAL( newChatMessage( const Oscar::Message& ) ),
+			         this, SIGNAL( messageReceived( const Oscar::Message& ) ) );
+		}
+		emit chatRoomConnected( exchange, roomName );
+	}
+	
 	emit redirectionFinished( d->currentRedirect );
 
 }
Index: kopete/protocols/oscar/liboscar/client.h
===================================================================
--- kopete/protocols/oscar/liboscar/client.h	(revision 872808)
+++ kopete/protocols/oscar/liboscar/client.h	(revision 872809)
@@ -37,8 +37,6 @@
 #include "contact.h"
 
 class Connection;
-class StageOneLoginTask;
-class StageTwoLoginTask;
 class ContactManager;
 class UserDetails;
 class QString;
@@ -620,9 +618,6 @@
 private:
 	class ClientPrivate;
 	ClientPrivate* d;
-
-	StageOneLoginTask* m_loginTask;
-	StageTwoLoginTask* m_loginTaskTwo;
 };
 Q_DECLARE_OPERATORS_FOR_FLAGS(Client::ICQStatus)
 


Index: kdenetwork.spec
===================================================================
RCS file: /cvs/extras/rpms/kdenetwork/F-9/kdenetwork.spec,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -r1.154 -r1.155
--- kdenetwork.spec	29 Sep 2008 17:15:58 -0000	1.154
+++ kdenetwork.spec	20 Oct 2008 11:07:20 -0000	1.155
@@ -5,7 +5,7 @@
 Name: kdenetwork
 Epoch: 7
 Version: 4.1.2
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 License: GPLv2
 Group: Applications/Internet
@@ -13,6 +13,9 @@
 Source0: ftp://ftp.kde.org/pub/kde/unstable/%{version}/src/%{name}-%{version}.tar.bz2
 
 # upstream patches
+Patch100:	kdenetwork-4.1.3-kde#172011-kopete-crash-logout.patch
+Patch101:	kdenetwork-4.1.3-kde#172985-kopete-crash-accounts.patch
+Patch102:	kdenetwork-4.1.3-kde#172997-kopete-crash-login.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -90,6 +93,9 @@
 
 %prep
 %setup -q
+%patch100 -p0 -b .kde#172011-kopete-crash-logout
+%patch101 -p0 -b .kde#172985-kopete-crash-accounts
+%patch102 -p0 -b .kde#172997-kopete-crash-login
 
 %build
 mkdir -p %{_target_platform}
@@ -164,6 +170,10 @@
 
 
 %changelog
+* Mon Oct 20 2008 Lukáš Tinkl <ltinkl at redhat.com> 4.1.2-3
+- fix kopete crashes on logout (kdebug:172011), in the account editor
+  (kdebug:172985) and during login (kdebug:172997)
+
 * Mon Sep 29 2008 Rex Dieter <rdieter at fedoraproject.org> 4.1.2-2
 - make VERBOSE=1
 - respin against new(er) kde-filesystem




More information about the fedora-extras-commits mailing list