[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/kopete/protocols/msn
From: Olivier Goffart <ogoffart () tiscalinet ! be>
Date: 2003-08-20 16:47:57
[Download RAW message or body]
CVS commit by ogoffart:
Disconnect MSN if it detect the conneciton has been closed. (it may take between 1 \
and 2 minutes)
M +16 -3 msnnotifysocket.cpp 1.104
M +2 -0 msnnotifysocket.h 1.35
--- kdenonbeta/kopete/protocols/msn/msnnotifysocket.cpp #1.103:1.104
@@ -74,4 +74,5 @@ void MSNNotifySocket::connect( const QSt
dispatchOK=false;
m_isHotmailAccount=false;
+ m_ping=false;
m_dispatchSocket = new MSNDispatchSocket( msnId() ,this);
@@ -387,4 +388,5 @@ void MSNNotifySocket::parseCommand( cons
{
//this is a reply from a ping
+ m_ping=false;
}
else if( cmd == "URL" )
@@ -663,7 +665,18 @@ void MSNNotifySocket::slotDispatchClosed
void MSNNotifySocket::slotSendKeepAlive()
{
+ //we did not received the previous QNG
+ if(m_ping)
+ {
+ disconnect();
+ KMessageBox::information( 0, i18n( "Conneciton with the MSN network \
has been lost" ) , i18n ("MSN Plugin") ); + return;
+ }
+ else
+ {
// Send a dummy command to fake activity. This makes sure MSN doesn't
// disconnect you when the notify socket is idle.
sendCommand( "PNG" , QString::null , false );
+ m_ping=true;
+ }
}
--- kdenonbeta/kopete/protocols/msn/msnnotifysocket.h #1.34:1.35
@@ -152,4 +152,6 @@ private:
QTimer *m_keepaliveTimer;
+ bool m_ping;
+
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic