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

List:       kde-commits
Subject:    kdenetwork/kopete/protocols/yahoo
From:       Matt Rogers <mattr () kde ! org>
Date:       2004-12-17 6:01:36
Message-ID: 20041217060136.8EB801BC94 () office ! kde ! org
[Download RAW message or body]

CVS commit by mattr: 

Drop out of connecting mode when socket layer connection fails.

BUG: 92318


  M +5 -4      kyahoo.cpp   1.68
  M +1 -1      yahooaccount.cpp   1.113


--- kdenetwork/kopete/protocols/yahoo/kyahoo.cpp  #1.67:1.68
@@ -1003,12 +1003,12 @@ int YahooSession::_hostAsyncConnectRecei
 {
         struct connect_callback_data *ccd;
-        int error;
+        int socketError;
         kdDebug(14181) << k_funcinfo << endl;
         m_socket = new KExtendedSocket( host, port );
 
         // TODO Do an async connect in the future
-        error = m_socket->connect();
+        socketError = m_socket->connect();
 
-        if ( !error )
+        if ( !socketError )
         {
                 kdDebug(14181) << k_funcinfo << " Connected! fd "<< m_socket->fd() << endl;
@@ -1016,5 +1016,5 @@ int YahooSession::_hostAsyncConnectRecei
                 return 0;
         }
-        else if( error == -1 && errno == EINPROGRESS )
+        else if( socketError == -1 && errno == EINPROGRESS )
         {
                 kdDebug(14181) << k_funcinfo << " In progress?" << endl;
@@ -1032,4 +1032,5 @@ int YahooSession::_hostAsyncConnectRecei
                 delete m_socket;
                 m_socket = 0L;
+                emit error( QString::null , -1 );
                 return -1;
         }

--- kdenetwork/kopete/protocols/yahoo/yahooaccount.cpp  #1.112:1.113
@@ -729,5 +729,5 @@ void YahooAccount::slotError( const QStr
         kdDebug(14180) << k_funcinfo << err << endl;
         m_lastDisconnectCode = fatal;
-        if ( fatal == 1 || fatal == 2 )
+        if ( fatal == 1 || fatal == 2 || fatal == -1 )
                 disconnect();
 }


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

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