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

List:       kde-commits
Subject:    kdenetwork/kopete/protocols/msn
From:       Olivier Goffart <ogoffart () kde ! org>
Date:       2005-02-18 13:52:34
Message-ID: 20050218135234.009981D4C1 () office ! kde ! org
[Download RAW message or body]

CVS commit by ogoffart: 

Let open several chat session in the same time.
I haven't designed MSN to be able to open several chat in the exact same time, \
because i thought it was not needed.   But if we want to download images of a lot of \
contact in the same time, this is required.


  M +5 -19     msnaccount.cpp   1.113
  M +1 -1      msnaccount.h   1.37


--- kdenetwork/kopete/protocols/msn/msnaccount.cpp  #1.112:1.113
@@ -1067,5 +1067,5 @@ void MSNAccount::slotContactRemoved( con
 void MSNAccount::slotCreateChat( const QString& address, const QString& auth )
 {
-        slotCreateChat( 0L, address, auth, m_msgHandle, m_msgHandle );
+        slotCreateChat( 0L, address, auth, m_msgHandle.first(), m_msgHandle.first() \
);  }
 
@@ -1078,6 +1078,6 @@ void MSNAccount::slotCreateChat( const Q
         {
                 // we have lost the handle?
+                kdDebug(14140) << k_funcinfo << "Impossible to open a chat session, \
I forgot the contact to invite" <<endl;  // forget it
-                // ( that can be because the user try to open two swichboard in the \
same time )  return;
         }
@@ -1124,5 +1124,6 @@ void MSNAccount::slotCreateChat( const Q
         }
 
-        m_msgHandle = QString::null;
+        if(!m_msgHandle.isEmpty())
+                m_msgHandle.pop_front();
 }
 
@@ -1133,19 +1134,4 @@ void MSNAccount::slotStartChatSession( c
         // connection to reuse...
 
-        if ( !m_msgHandle.isNull() )
-        {
-                // Hep hep hep l'ami! I am not crazy! i know you are trying to open
-                // a new chat session, but the previous one is not yet created.
-                // if it is with the same m_msgHandle, that is certenely because you
-                // are impatient, but you have to wait the server reply
-                if ( m_msgHandle == handle )
-                        return;
-
-                // else, you are trying to open two sessions in the same time
-                // it will have conflict. but i can't return, may be you ask a \
                signle
-                // session because the previous one was not created due to a \
                randomely error
-                // never mind then, i don't care
-        }
-
         MSNContact *c = static_cast<MSNContact *>( contacts()[ handle ] );
         // if ( isConnected() && c && myself() && handle != m_msnId )
@@ -1154,5 +1140,5 @@ void MSNAccount::slotStartChatSession( c
                 if ( !c->manager(Kopete::Contact::CannotCreate) || \
!static_cast<MSNChatSession *>( c->manager( Kopete::Contact::CanCreate ) )->service() \
)  {
-                        m_msgHandle = handle;
+                        m_msgHandle.append(handle);
                         m_notifySocket->createChatSession();
                 }

--- kdenetwork/kopete/protocols/msn/msnaccount.h  #1.36:1.37
@@ -192,5 +192,5 @@ private:
         Kopete::OnlineStatus m_connectstatus;
 
-        QString m_msgHandle;
+        QStringList m_msgHandle;
 
         bool m_newContactList;


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

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