[prev in list] [next in list] [prev in thread] [next in thread]
List: kopete-devel
Subject: [Kopete-devel] [Bug 67287] yahoo plugin goes offline without
From: Matt Rogers <matt.rogers () kdemail ! net>
Date: 2004-02-29 5:44:15
Message-ID: 20040229054415.6470.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=67287
matt.rogers kdemail net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From matt.rogers kdemail net 2004-02-29 06:44 -------
CVS commit by mattr:
Fix bug 67287 by implementing a form of keepalive support for the Yahoo
plugin. This version expands on a patch attached to bug 67287 by using a
method that checks for a response when the timer expires. It's a little
different from the HEAD version becaues the first patch for this bug
didn't make it into the stable branch.
CCMAIL: 67287-done bugs kde org
M +37 -24 kyahoo.cpp 1.53.2.1
M +19 -10 kyahoo.h 1.18.4.1
M +5 -2 yahooaccount.cpp 1.63.2.2
--- kdenetwork/kopete/protocols/yahoo/kyahoo.cpp #1.53:1.53.2.1
@ -24,4 +24,5 @
// QT Includes
#include <qfile.h>
+#include <qtimer.h>
// KDE Includes
@ -139,4 +140,7 @ YahooSession::YahooSession(int id, const
m_Password = password;
m_socket = 0L;
+ m_waitingForKeepalive = false;
+ m_keepalive = new QTimer( this, "keepaliveTimer" );
+ connect( m_keepalive, SIGNAL( timeout() ), this, SLOT( refresh() ) );
}
@ -188,5 +192,11 @ void YahooSession::refresh()
{
kdDebug(14181) << k_funcinfo << endl;
+ if ( !m_waitingForKeepalive )
+ {
+ m_waitingForKeepalive = true;
yahoo_refresh( m_connId );
+ }
+ else
+ emit error( "Disconnected." , 1 );
}
@ -1042,4 +1052,7 @ void YahooSession::slotReadReady()
kdDebug(14181) << k_funcinfo << "Socket FD: " << fd << endl;
+ if ( m_waitingForKeepalive )
+ m_waitingForKeepalive = false;
+
ret = yahoo_read_ready( m_connId , fd, m_data );
--- kdenetwork/kopete/protocols/yahoo/kyahoo.h #1.18:1.18.4.1
@ -34,4 +34,5 @ class YahooSession;
class KExtendedSocket;
class QSocketNotifier;
+class QTimer;
/* Yahoo Protocol Connection Manager */
@ -79,5 +80,4 @ public:
void login(int initial);
void logOff();
- void refresh();
void setIdentityStatus( const QString &identity, int active);
void getList();
@ -135,4 +135,7 @ public:
int _hostAsyncConnectReceiver(char *host, int port, yahoo_connect_callback \
callback, void *callback_data);
+public slots:
+ void refresh();
+
signals:
/**
@ -231,9 +235,11 @ signals:
//void hostConnect(char *host, int port);
- private slots:
+private slots:
+
void slotLoginResponseReceiver( int succ, char *url);
void slotReadReady();
void slotWriteReady();
- private:
+
+private:
/* Private constructor */
YahooSession(int id, const QString username, const QString password);
@ -254,4 +260,7 @ signals:
QString m_BuddyListServer; // Buddy List server
int m_BuddyListPort;
+ QTimer* m_keepalive;
+
+ bool m_waitingForKeepalive;
};
--- kdenetwork/kopete/protocols/yahoo/yahooaccount.cpp #1.63.2.1:1.63.2.2
@ -569,7 +569,10 @ void YahooAccount::slotSystemMessage( co
}
-void YahooAccount::slotError( const QString & /* err */, int /* fatal */ )
+void YahooAccount::slotError( const QString & err, int fatal )
{
-// kdDebug(14180) << k_funcinfo << endl;
+ Q_UNUSED( err );
+ kdDebug(14180) << k_funcinfo << endl;
+ if ( fatal == 1 )
+ disconnect();
}
_______________________________________________
Kopete-devel mailing list
Kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic