Hello community,
here is the log from the commit of package kdenetwork3
checked in at Tue Feb 6 16:32:51 CET 2007.
--------
--- KDE/kdenetwork3/kdenetwork3.changes 2007-01-17 12:08:52.000000000 +0100
+++ /mounts/work_src_done/STABLE/kdenetwork3/kdenetwork3.changes 2007-02-06 16:09:08.000000000 +0100
@@ -1,0 +2,5 @@
+Tue Feb 6 16:08:13 CET 2007 - wstephenson@suse.de
+
+- Fix sending GroupWise Messenger keepalives, as required by SP2 (#222149, #242584)
+
+-------------------------------------------------------------------
New:
----
groupwise_SP2_keepalive.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdenetwork3.spec ++++++
--- /var/tmp/diff_new_pack.t20787/_old 2007-02-06 16:32:30.000000000 +0100
+++ /var/tmp/diff_new_pack.t20787/_new 2007-02-06 16:32:30.000000000 +0100
@@ -17,7 +17,7 @@
Summary: KDE Network Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Version: 3.5.6
-Release: 1
+Release: 2
Provides: kdenetwork3-lan:/opt/kde3/bin/kpf
Source0: kdenetwork-%{version}.tar.bz2
Source1: init.lisa
@@ -37,6 +37,7 @@
Patch15: start-samba-on-fileshare.diff
Patch17: hide-ugly-kcmsambaconf-icon.diff
Patch19: wifi-without-arts.patch
+Patch20: groupwise_SP2_keepalive.diff
Patch100: knewsticker_sources.patch
Url: http://www.kde.org
Requires: kdelibs3 >= %( echo `rpm -q --queryformat '%{VERSION}' kdelibs3`)
@@ -243,6 +244,7 @@
%patch15
%patch17
%patch19
+%patch20
%patch100
# remove ktalkd for security reasons
rm -rf ktalkd doc/ktalkd doc/kcontrol/kcmktalkd
@@ -629,6 +631,8 @@
%endif
%changelog -n kdenetwork3
+* Tue Feb 06 2007 - wstephenson@suse.de
+- Fix sending GroupWise Messenger keepalives, as required by SP2 (#222149, #242584)
* Tue Jan 16 2007 - stbinner@suse.de
- update to 3.5.6 release:
* several bugfixes within Kopete and its protocol support
++++++ groupwise_SP2_keepalive.diff ++++++
Index: kopete/protocols/groupwise/libgroupwise/client.h
===================================================================
--- kopete/protocols/groupwise/libgroupwise/client.h (revision 630591)
+++ kopete/protocols/groupwise/libgroupwise/client.h (working copy)
@@ -370,6 +370,10 @@
* Receive a custom status during login and record it
*/
void lt_gotCustomStatus( const GroupWise::CustomStatus & );
+ /**
+ * Notify us of the keepalive period contained in the login response
+ */
+ void lt_gotKeepalivePeriod( int );
/**
* Used by the client stream to notify errors to upper layers.
@@ -380,6 +384,11 @@
* The client stream has data ready to read.
*/
void streamReadyRead();
+
+ /**
+ * sendout a 'ping' keepalive message so that the server does not disconnect us
+ */
+ void sendKeepAlive();
private:
void distribute( Transfer *transfer );
Index: kopete/protocols/groupwise/libgroupwise/tasks/keepalivetask.cpp
===================================================================
--- kopete/protocols/groupwise/libgroupwise/tasks/keepalivetask.cpp (revision 630591)
+++ kopete/protocols/groupwise/libgroupwise/tasks/keepalivetask.cpp (working copy)
@@ -19,29 +19,21 @@
*************************************************************************
*/
-#include
-
#include "client.h"
#include "request.h"
#include "requestfactory.h"
#include "keepalivetask.h"
-#define GW_KEEPALIVE_INTERVAL 60000
-
KeepAliveTask::KeepAliveTask(Task* parent): RequestTask(parent)
{
- m_keepAliveTimer = new QTimer( this );
- connect( m_keepAliveTimer, SIGNAL( timeout() ), SLOT( slotSendKeepAlive() ) );
- m_keepAliveTimer->start( GW_KEEPALIVE_INTERVAL );
}
KeepAliveTask::~KeepAliveTask()
{
- delete m_keepAliveTimer;
}
-void KeepAliveTask::slotSendKeepAlive()
+void KeepAliveTask::setup()
{
Field::FieldList lst;
createTransfer( "ping", lst );
Index: kopete/protocols/groupwise/libgroupwise/tasks/keepalivetask.h
===================================================================
--- kopete/protocols/groupwise/libgroupwise/tasks/keepalivetask.h (revision 630591)
+++ kopete/protocols/groupwise/libgroupwise/tasks/keepalivetask.h (working copy)
@@ -23,8 +23,6 @@
#include "requesttask.h"
-class QTimer;
-
/**
@author Kopete Developers
*/
@@ -34,10 +32,7 @@
public:
KeepAliveTask(Task* parent);
~KeepAliveTask();
-protected slots:
- void slotSendKeepAlive();
-private:
- QTimer * m_keepAliveTimer;
+ void setup();
};
#endif
Index: kopete/protocols/groupwise/libgroupwise/tasks/logintask.h
===================================================================
--- kopete/protocols/groupwise/libgroupwise/tasks/logintask.h (revision 630591)
+++ kopete/protocols/groupwise/libgroupwise/tasks/logintask.h (working copy)
@@ -50,7 +50,7 @@
void extractPrivacy( Field::FieldList & fields );
QStringList readPrivacyItems( const QCString & tag, Field::FieldList & fields );
void extractCustomStatuses( Field::FieldList & fields );
-
+ void extractKeepalivePeriod( Field::FieldList & fields );
signals:
void gotMyself( const GroupWise::ContactDetails & );
void gotFolder( const FolderItem & );
@@ -58,6 +58,7 @@
void gotContactUserDetails( const GroupWise::ContactDetails & );
void gotPrivacySettings( bool locked, bool defaultDeny, const QStringList & allowList, const QStringList & denyList );
void gotCustomStatus( const GroupWise::CustomStatus & );
+ void gotKeepalivePeriod( int );
};
#endif
Index: kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp
===================================================================
--- kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp (revision 630591)
+++ kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp (working copy)
@@ -99,7 +99,9 @@
container = static_cast( *it );
extractContact( container );
}
-
+
+ extractKeepalivePeriod( loginResponseFields );
+
setSuccess();
return true;
@@ -340,4 +342,21 @@
}
}
+void LoginTask::extractKeepalivePeriod( Field::FieldList & fields )
+{
+ Field::FieldListIterator it = fields.find( NM_A_UD_KEEPALIVE );
+ if ( it != fields.end() )
+ {
+ if ( Field::SingleField * sf = dynamic_cast( *it ) )
+ {
+ bool ok;
+ int period = sf->value().toInt( &ok );
+ if ( ok )
+ {
+ emit gotKeepalivePeriod( period );
+ }
+ }
+ }
+}
+
#include "logintask.moc"
Index: kopete/protocols/groupwise/libgroupwise/client.cpp
===================================================================
--- kopete/protocols/groupwise/libgroupwise/client.cpp (revision 630591)
+++ kopete/protocols/groupwise/libgroupwise/client.cpp (working copy)
@@ -20,6 +20,7 @@
*/
#include
+#include
#include "chatroommanager.h"
#include "gwclientstream.h"
@@ -63,6 +64,7 @@
PrivacyManager * privacyMgr;
uint protocolVersion;
QValueListGroupWise::CustomStatus customStatuses;
+ QTimer * keepAliveTimer;
};
Client::Client(QObject *par, uint protocolVersion )
@@ -82,6 +84,9 @@
d->privacyMgr = new PrivacyManager( this, "privacymgr" );
d->stream = 0;
d->protocolVersion = protocolVersion;
+ // Sends regular keepalives so the server knows we are still running
+ d->keepAliveTimer = new QTimer( this );
+ connect( d->keepAliveTimer, SIGNAL( timeout() ), SLOT( sendKeepAlive() ) );
}
Client::~Client()
@@ -149,6 +154,8 @@
connect( login, SIGNAL( gotCustomStatus( const GroupWise::CustomStatus & ) ),
SLOT( lt_gotCustomStatus( const GroupWise::CustomStatus & ) ) );
+ connect( login, SIGNAL( gotKeepalivePeriod( int ) ), SLOT( lt_gotKeepalivePeriod( int ) ) );
+
connect( login, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) );
login->initialise();
@@ -319,9 +326,6 @@
SetStatusTask * sst = new SetStatusTask( d->root );
sst->status( GroupWise::Available, QString::null, QString::null );
sst->go( true );
- // Sends keepalives every minute so the server knows we are still alive
- KeepAliveTask * kat = new KeepAliveTask( d->root );
- kat->go( true );
emit loggedIn();
// fetch details for any privacy list items that aren't in our contact list.
// There is a chicken-and-egg case regarding this: We need the privacy before reading the contact list so
@@ -506,4 +510,15 @@
return d->chatroomMgr;
}
+void Client::lt_gotKeepalivePeriod( int period )
+{
+ d->keepAliveTimer->start( period * 60 * 1000 );
+}
+
+void Client::sendKeepAlive()
+{
+ KeepAliveTask * kat = new KeepAliveTask( d->root );
+ kat->setup();
+ kat->go( true );
+}
#include "client.moc"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org