[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdenetwork/kopete/protocols/yahoo
From:       Andre Duffeck <andre () duffeck ! de>
Date:       2009-01-09 11:25:56
Message-ID: 1231500356.411396.9537.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 908161 by duffeck:

Do not try to logoff twice
BUG:166553


 M  +8 -0      libkyahoo/client.cpp  
 M  +1 -0      libkyahoo/client.h  
 M  +2 -2      yahooaccount.cpp  


--- trunk/KDE/kdenetwork/kopete/protocols/yahoo/libkyahoo/client.cpp #908160:908161
@@ -155,6 +155,7 @@
 	QObject::connect( d->stream, SIGNAL( connected() ), this, SLOT( cs_connected() ) );
 	QObject::connect( d->stream, SIGNAL( error(int) ), this, SLOT( streamError(int) ) );
 	QObject::connect( d->stream, SIGNAL( readyRead() ), this, SLOT( streamReadyRead() ) );
+	QObject::connect( d->stream, SIGNAL( disconnected() ), this, SLOT( streamDisconnected() ) );
 	
 	d->stream->connectToServer( host, false );
 }
@@ -195,6 +196,7 @@
 	if( m_connector )
 		m_connector->deleteLater();
 	m_connector = 0L;
+	d->active = false;
 }
 
 int Client::error()
@@ -245,6 +247,12 @@
 	distribute( transfer );
 }
 
+void Client::streamDisconnected()
+{
+	d->active = false;
+	emit disconnected();
+}
+
 void Client::lt_loginFinished()
 {
 	kDebug(YAHOO_RAW_DEBUG) ;
--- trunk/KDE/kdenetwork/kopete/protocols/yahoo/libkyahoo/client.h #908160:908161
@@ -672,6 +672,7 @@
 		void lt_gotSessionID( uint );
 		void cs_connected();
 		void slotGotCookies();
+		void streamDisconnected();
 		
 		/**
 		 * Used by tasks to identify a response to a login attempt
--- trunk/KDE/kdenetwork/kopete/protocols/yahoo/yahooaccount.cpp #908160:908161
@@ -543,7 +543,8 @@
 	if ( isConnected() )
 	{
 		kDebug(YAHOO_GEN_DEBUG) <<  "Attempting to disconnect from Yahoo server ";
-
+		
+		disconnected( Manual );
 		m_session->close();
 		static_cast<YahooContact *>( myself() )->setOnlineStatus( m_protocol->Offline );
 
@@ -551,7 +552,6 @@
 		for ( it = contacts().constBegin(); it != itEnd; ++it )
 			static_cast<YahooContact *>( it.value() )->setOnlineStatus( m_protocol->Offline );
 
-		disconnected( Manual );
 	}
 	else
 	{       //make sure we set everybody else offline explicitly, just for cleanup
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic