summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2006-07-25 11:17:47 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2006-07-25 11:17:47 +0000
commit0aff3f1ab0c2a646277f28dfa08c62cb778ccf6f (patch)
tree338258076bbaab23360f68e3616f60097b4e8bee /kde-base/kopete
parentFix patch for strict aliasing as the old one won't apply (half applied upstre... (diff)
downloadgentoo-2-0aff3f1ab0c2a646277f28dfa08c62cb778ccf6f.tar.gz
gentoo-2-0aff3f1ab0c2a646277f28dfa08c62cb778ccf6f.tar.bz2
gentoo-2-0aff3f1ab0c2a646277f28dfa08c62cb778ccf6f.zip
Remove icqfix patch (not needed) and add newer oscarcontacts patch, reported by Roman Jarosz in bug #141675.
(Portage version: 2.1.1_pre3-r3)
Diffstat (limited to 'kde-base/kopete')
-rw-r--r--kde-base/kopete/ChangeLog7
-rw-r--r--kde-base/kopete/files/kopete-3.5.x-oscarcontacts.patch132
-rw-r--r--kde-base/kopete/kopete-3.5.4.ebuild4
3 files changed, 140 insertions, 3 deletions
diff --git a/kde-base/kopete/ChangeLog b/kde-base/kopete/ChangeLog
index 8b5705555307..62eb9f5d4060 100644
--- a/kde-base/kopete/ChangeLog
+++ b/kde-base/kopete/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for kde-base/kopete
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kopete/ChangeLog,v 1.70 2006/07/25 07:14:35 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kopete/ChangeLog,v 1.71 2006/07/25 11:17:47 flameeyes Exp $
+
+ 25 Jul 2006; Diego Pettenò <flameeyes@gentoo.org>
+ +files/kopete-3.5.x-oscarcontacts.patch, kopete-3.5.4.ebuild:
+ Remove icqfix patch (not needed) and add newer oscarcontacts patch, reported
+ by Roman Jarosz in bug #141675.
*kopete-3.5.4 (25 Jul 2006)
diff --git a/kde-base/kopete/files/kopete-3.5.x-oscarcontacts.patch b/kde-base/kopete/files/kopete-3.5.x-oscarcontacts.patch
new file mode 100644
index 000000000000..7ea35079f58e
--- /dev/null
+++ b/kde-base/kopete/files/kopete-3.5.x-oscarcontacts.patch
@@ -0,0 +1,132 @@
+http://bugs.gentoo.org/show_bug.cgi?id=141675
+http://bugs.kde.org/show_bug.cgi?id=104243
+
+Index: kopete/protocols/oscar/liboscar/ssimanager.cpp
+===================================================================
+--- kopete/protocols/oscar/liboscar/ssimanager.cpp (revision 565951)
++++ kopete/protocols/oscar/liboscar/ssimanager.cpp (working copy)
+@@ -71,18 +71,65 @@
+ while ( it != d->SSIList.end() && d->SSIList.count() > 0 )
+ it = d->SSIList.remove( it );
+ };
++
++ d->nextContactId = 0;
++ d->nextGroupId = 0;
+ }
+
+ WORD SSIManager::nextContactId()
+ {
+- d->nextContactId++;
+- return d->nextContactId;
++ if ( d->nextContactId == 0 )
++ d->nextContactId++;
++
++ QValueList<Oscar::SSI>::const_iterator it, listEnd;
++
++ for ( ; d->nextContactId < 0x8000; d->nextContactId++ )
++ {
++ bool freeId = true;
++ listEnd = d->SSIList.end();
++ for ( it = d->SSIList.begin(); it != listEnd; ++it )
++ {
++ if ( ( *it ).bid() == d->nextContactId )
++ {
++ freeId = false;
++ break;
++ }
++ }
++
++ if ( freeId )
++ return d->nextContactId;
++ }
++
++ kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No free id!" << endl;
++ return 0xFFFF;
+ }
+
+ WORD SSIManager::nextGroupId()
+ {
+- d->nextGroupId++;
+- return d->nextGroupId;
++ if ( d->nextGroupId == 0 )
++ d->nextGroupId++;
++
++ QValueList<Oscar::SSI>::const_iterator it, listEnd;
++
++ for ( ; d->nextGroupId < 0x8000; d->nextGroupId++ )
++ {
++ bool freeId = true;
++ listEnd = d->SSIList.end();
++ for ( it = d->SSIList.begin(); it != listEnd; ++it )
++ {
++ if ( ( *it ).type() == ROSTER_GROUP && ( *it ).gid() == d->nextGroupId )
++ {
++ freeId = false;
++ break;
++ }
++ }
++
++ if ( freeId )
++ return d->nextGroupId;
++ }
++
++ kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No free group id!" << endl;
++ return 0xFFFF;
+ }
+
+ WORD SSIManager::numberOfItems() const
+@@ -379,8 +426,6 @@
+ if ( !group.name().isEmpty() ) //avoid the group with gid 0 and bid 0
+ { // the group is really new
+ kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Adding group '" << group.name() << "' to SSI list" << endl;
+- if ( group.gid() > d->nextGroupId )
+- d->nextGroupId = group.gid();
+
+ d->SSIList.append( group );
+ emit groupAdded( group );
+@@ -394,6 +439,10 @@
+ QString groupName = group.name();
+ kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Removing group " << group.name() << endl;
+ int remcount = d->SSIList.remove( group );
++
++ if ( d->nextGroupId > group.gid() )
++ d->nextGroupId = group.gid();
++
+ if ( remcount == 0 )
+ {
+ kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No groups removed" << endl;
+@@ -420,13 +469,6 @@
+
+ bool SSIManager::newContact( const Oscar::SSI& contact )
+ {
+- //what to validate?
+- if ( contact.bid() > d->nextContactId )
+- {
+- kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Setting next contact ID to " << contact.bid() << endl;
+- d->nextContactId = contact.bid();
+- }
+-
+ if ( d->SSIList.findIndex( contact ) == -1 )
+ {
+ kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Adding contact '" << contact.name() << "' to SSI list" << endl;
+@@ -443,6 +485,9 @@
+ QString contactName = contact.name();
+ int remcount = d->SSIList.remove( contact );
+
++ if ( d->nextContactId > contact.bid() )
++ d->nextContactId = contact.bid();
++
+ if ( remcount == 0 )
+ {
+ kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No contacts were removed." << endl;
+@@ -476,6 +521,10 @@
+ bool SSIManager::removeItem( const Oscar::SSI& item )
+ {
+ d->SSIList.remove( item );
++
++ if ( d->nextContactId > item.bid() )
++ d->nextContactId = item.bid();
++
+ return true;
+ }
+
diff --git a/kde-base/kopete/kopete-3.5.4.ebuild b/kde-base/kopete/kopete-3.5.4.ebuild
index 13c08369d7e6..805295494dfd 100644
--- a/kde-base/kopete/kopete-3.5.4.ebuild
+++ b/kde-base/kopete/kopete-3.5.4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kopete/kopete-3.5.4.ebuild,v 1.1 2006/07/25 07:14:35 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kopete/kopete-3.5.4.ebuild,v 1.2 2006/07/25 11:17:47 flameeyes Exp $
KMNAME=kdenetwork
MAXKDEVER=$PV
@@ -46,7 +46,7 @@ DEPEND="${BOTH_DEPEND}
x11-proto/scrnsaverproto
) <virtual/x11-7 )"
-PATCHES="${FILESDIR}/${P}-icqfix.patch"
+PATCHES="${FILESDIR}/${PN}-3.5.x-oscarcontacts.patch"
pkg_setup() {
if use kernel_linux && ! built_with_use =x11-libs/qt-3* opengl; then