Bug 104243 - [liboscar] add contact doesn't work all the time
Summary: [liboscar] add contact doesn't work all the time
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: ICQ and AIM Plugins (show other bugs)
Version: 0.10
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Roman Jarosz
URL:
Keywords:
: 114234 115143 117566 124914 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-19 22:44 UTC by Christopher J. Bottaro
Modified: 2006-11-05 20:31 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Start, Connect, Add contact, Disconnect, Quit (141.78 KB, text/plain)
2006-03-22 03:32 UTC, Bennid
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher J. Bottaro 2005-04-19 22:44:31 UTC
Version:           0.10 (using KDE 3.4.0-1.4.3.kde, Fedora)
Compiler:          gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
OS:                Linux (i686) release 2.6.11-1.14_FC3

i just added a contact to an aim account and the contact was showing up offline which was weird because the person was online.  so i fired up gaim and the person was NOT on my contact list.  kopete did not add the contact to my buddy list on the aim server.
Comment 1 Matt Rogers 2005-04-20 17:32:05 UTC
how many people do you have on your contact list?
Comment 2 Christopher J. Bottaro 2005-04-20 17:48:51 UTC
is there a way to easily find out besides manually counting?  i looks like i have over 50, but i'd guess that 70% of them are always offline (if that makes a difference).
Comment 3 Matt Rogers 2005-10-07 02:35:34 UTC
is there a specific thing that I can do to reproduce this? I don't have any problems adding contacts to my list so i'm quite stumped as to what actually causes this and how I can fix it.

Also, if you could recompile kopete with debug enabled (or install debuginfo RPMs for your distribution if they're available) and provide debug output, that would be helpful.
Comment 4 Jamie Fifield 2005-10-13 15:26:57 UTC
I have this problem when I don't "Use the KDE address book for this contact".  If I create an addressbook entry in advance for a contact and use it when adding an AIM contact, I've been successful in getting a contact added.

Kopete v0.10.2
Comment 5 Matt Rogers 2005-11-07 22:50:50 UTC
*** Bug 115143 has been marked as a duplicate of this bug. ***
Comment 6 Carl 2005-11-25 22:59:45 UTC
I cannot add contact either.  When I start up kopete I am asked to add a contact from my address book.  I click add and the contact is added to my contact list but is not associated with a service, in this case aim.  I get this output from that:

kopete (oscar - raw protocol): [void Client::addContact(const QString&, const QString&)] Adding contact brandonandtony to SSI in group Buddies
kopete (oscar - raw protocol): [bool SSIModifyTask::addContact(const QString&, const QString&, bool)] creating new SSI item for brandonandtony in group Buddies
kopete (oscar - raw protocol): [void SSIModifyTask::sendSSIUpdate()] Adding an item to the SSI list
kopete (oscar - raw protocol): [void CoreProtocol::addIncomingData(const QByteArray&)] Received 26 bytes.
kopete (oscar - raw protocol): [virtual Transfer* SnacProtocol::parse(const QByteArray&, uint&)] family: 19 subtype: 14 flags: 32768 id: 43026
kopete (oscar - raw protocol): Acknowledgement code is 10
kopete (oscar - raw protocol): [void SSIModifyTask::handleSSIAck()] Error adding item ( invalid id, already in list, invalid data )

This happens every time kopete starts.  Furthermore, when I try to add a new contact without the address book I get the same error:

kopete (oscar): [virtual bool OscarAccount::createContact(const QString&, Kopete::MetaContact*)] New contact 'iampteradactyl' not in SSI. Creating new contact
kopete (oscar): [virtual bool OscarAccount::createContact(const QString&, Kopete::MetaContact*)] Adding iampteradactyl to server side list
kopete (oscar): [virtual bool OscarAccount::createContact(const QString&, Kopete::MetaContact*)] Contact with group. No. of groups = 1 Name of first group = Buddies
kopete (oscar - raw protocol): [void Client::addContact(const QString&, const QString&)] Adding contact iampteradactyl to SSI in group Buddies
kopete (oscar - raw protocol): [bool SSIModifyTask::addContact(const QString&, const QString&, bool)] creating new SSI item for iampteradactyl in group Buddies
kopete (oscar - raw protocol): [void SSIModifyTask::sendSSIUpdate()] Adding an item to the SSI list
libkopete: [bool Kopete::Account::addContact(const QString&, Kopete::MetaContact*, Kopete::Account::AddMode)]  changing KABC
libkopete: [void Kopete::KABCPersistence::write(Kopete::MetaContact*)] looking up Addressee for ...
kopete (oscar - raw protocol): [void CoreProtocol::addIncomingData(const QByteArray&)] Received 26 bytes.
kopete (oscar - raw protocol): [virtual Transfer* SnacProtocol::parse(const QByteArray&, uint&)] family: 19 subtype: 14 flags: 32768 id: 43029
kopete (oscar - raw protocol): Acknowledgement code is 10
kopete (oscar - raw protocol): [void SSIModifyTask::handleSSIAck()] Error adding item ( invalid id, already in list, invalid data )


This line particularly bothers me since I told Kopete which group to put the new contact in with the wizard:

Kopete::MetaContact*)] Contact with group. No. of groups = 1 Name of first group = Buddies

I also get the same results when adding a contact from me address book. I just compiled svn with --enable-debug=full to get this output.
Comment 7 Carl 2005-11-25 23:01:58 UTC
Ignore the "This line particularly bothers me" comment above, I misread the output.  
Comment 8 Matt Rogers 2006-01-13 05:59:01 UTC
I still need a bit more information. It seems like this contact is either already in your list, at least from the debug output that I can read here. Can you attach a whole debug log capture from sign-on until sign-off? Obviously, you would need to sign-on, wait approx. one minute for the connection's traffic to settle and then sign-off. That would helpful.
Comment 9 Matt Rogers 2006-03-16 19:39:10 UTC
*** Bug 117566 has been marked as a duplicate of this bug. ***
Comment 10 Matt Rogers 2006-03-16 19:50:37 UTC
*** Bug 114234 has been marked as a duplicate of this bug. ***
Comment 11 Bennid 2006-03-22 03:32:04 UTC
Created attachment 15254 [details]
Start, Connect, Add contact, Disconnect, Quit

I hope this helps ... I want this bug to be fixed ;-)
Comment 12 Matt Rogers 2006-03-22 05:06:49 UTC
Thanks for the log!
Comment 13 Matt Rogers 2006-04-05 00:01:13 UTC
*** Bug 124914 has been marked as a duplicate of this bug. ***
Comment 14 Richard Homonnai 2006-04-05 01:03:07 UTC
I have filed bug 124914, and now here I am. Looks like the same problem...

kopete (oscar/icq): [ICQAddContactPage::ICQAddContactPage(ICQAccount*, QWidget*, const char*)] called
kopete (oscar/icq): [virtual bool ICQAddContactPage::apply(Kopete::Account*, Kopete::MetaContact*)] called; adding contact...
kopete (oscar/icq): [virtual bool ICQAddContactPage::apply(Kopete::Account*, Kopete::MetaContact*)] uin=281796060
kopete (oscar): [virtual bool OscarAccount::createContact(const QString&, Kopete::MetaContact*)] New contact '281796060' not in SSI. Creating new contact
kopete (oscar): [virtual bool OscarAccount::createContact(const QString&, Kopete::MetaContact*)] Adding 281796060 to server side list
kopete (oscar): [virtual bool OscarAccount::createContact(const QString&, Kopete::MetaContact*)] Contact with group. No. of groups = 1 Name of first group = theow
kopete (oscar - raw protocol): [void Client::addContact(const QString&, const QString&)] Adding contact 281796060 to SSI in group theow
kopete (oscar - raw protocol): [bool SSIModifyTask::addContact(const QString&, const QString&, bool)] creating new SSI item for 281796060 in group theow
kopete (oscar - raw protocol): [void SSIModifyTask::sendSSIUpdate()] Adding an item to the SSI list
libkopete: [bool Kopete::Account::addContact(const QString&, Kopete::MetaContact*, Kopete::Account::AddMode)]  changing KABC
libkopete: [void Kopete::KABCPersistence::write(Kopete::MetaContact*)] looking up Addressee for ...
kopete (oscar - raw protocol): [void CoreProtocol::addIncomingData(const QByteArray&)] Received 26 bytes.
kopete (oscar - raw protocol): [virtual Transfer* SnacProtocol::parse(const QByteArray&, uint&)] family: 19 subtype: 14 flags: 32768 id: 67
kopete (oscar - raw protocol): Acknowledgement code is 10
kopete (oscar - raw protocol): [void SSIModifyTask::handleSSIAck()] Error adding item ( invalid id, already in list, invalid data )
Comment 15 Roman Jarosz 2006-05-28 13:13:25 UTC
SVN commit 545764 by rjarosz:

Fix bug 122136: Adding temp contacts does not work w/o first removing them.
We didn't update our local ssi list correctly so it could also fix bug 104243, please test it.

BUG: 122136
CCBUG: 104243



 M  +42 -0     liboscar/ssimanager.cpp  
 M  +8 -0      liboscar/ssimanager.h  
 M  +8 -1      liboscar/ssimodifytask.cpp  
 M  +94 -37    oscaraccount.cpp  
 M  +20 -2     oscaraccount.h  
 M  +9 -26     oscarcontact.cpp  
Comment 16 Roman Jarosz 2006-07-24 23:43:10 UTC
SVN commit 565948 by rjarosz:

Fix bug 104243: [liboscar] add contact doesn't work all the time

BUG: 104243



 M  +62 -19    ssimanager.cpp  


--- branches/kopete/0.12/kopete/protocols/oscar/liboscar/ssimanager.cpp #565947:565948
@@ -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
@@ -390,8 +437,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 );
@@ -426,6 +471,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;
@@ -452,13 +501,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;
@@ -496,6 +538,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;
@@ -520,12 +565,6 @@
 
 bool SSIManager::newItem( const Oscar::SSI& item )
 {
-	if ( item.bid() > d->nextContactId )
-	{
-		kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Setting next contact ID to " << item.bid() << endl;
-		d->nextContactId = item.bid();
-	}
-	
 	//no error checking for now
 	kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding item " << item.toString() << endl;
 	d->SSIList.append( item );
@@ -535,6 +574,10 @@
 bool SSIManager::removeItem( const Oscar::SSI& item )
 {
 	d->SSIList.remove( item );
+	
+	if ( d->nextContactId > item.bid() )
+		d->nextContactId = item.bid();
+	
 	return true;
 }
 
Comment 17 Roman Jarosz 2006-07-24 23:54:38 UTC
SVN commit 565952 by rjarosz:

Backport fix for bug 104243: [liboscar] add contact doesn't work all the time

CCBUG: 104243



 M  +62 -13    ssimanager.cpp  


--- branches/KDE/3.5/kdenetwork/kopete/protocols/oscar/liboscar/ssimanager.cpp #565951:565952
@@ -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;
 }
 
Comment 18 Roman Jarosz 2006-07-25 00:00:27 UTC
This patch is not in Kopete 0.11.4 (KDE 3.5.4) and 0.12.1.
Comment 19 Richard Homonnai 2006-07-25 00:27:01 UTC
Hello,

Thank you very much for fixing this.
Do you know where it will be contained? 0.12.2? or can the patch be applied 
against 0.12.1? I am gentoo user and would like to add contacts without 
Gaim ;). Is this the bug responsible for adding "empty" contacts when adding 
a ICQ contact?

Greetings,
Richard

Am Dienstag 25 Juli 2006 00:00 schrieb Roman Jarosz:
[bugs.kde.org quoted mail]
Comment 20 Roman Jarosz 2006-07-25 11:06:15 UTC
I don't know if we are doing 0.12.2 release.

Patch can be applied against 0.12.1 and it will be in next revbump for 0.12 in gentoo.
Comment 21 Richard Homonnai 2006-07-26 15:30:11 UTC
great! this patch fixed it!
Comment 22 Roman Jarosz 2006-07-27 14:51:52 UTC
SVN commit 566889 by rjarosz:

Don't use id of items that are waiting to be sent to server.
Fix adding multiple items at once that was broken by commit 545764.

CCBUG: 104243



 M  +73 -43    ssimanager.cpp  
 M  +5 -0      ssimanager.h  
 M  +29 -0     ssimodifytask.cpp  
 M  +3 -0      ssimodifytask.h  


--- branches/kopete/0.12/kopete/protocols/oscar/liboscar/ssimanager.cpp #566888:566889
@@ -29,6 +29,8 @@
 {
 public:
 	QValueList<Oscar::SSI> SSIList;
+	QValueList<WORD> groupIdList;
+	QValueList<WORD> itemIdList;
 	WORD lastModTime;
 	WORD maxContacts;
 	WORD maxGroups;
@@ -72,6 +74,8 @@
 			it = d->SSIList.remove( it );
 	};
 	
+	d->itemIdList.clear();
+	d->groupIdList.clear();
 	d->nextContactId = 0;
 	d->nextGroupId = 0;
 }
@@ -81,27 +85,18 @@
 	if ( d->nextContactId == 0 )
 		d->nextContactId++;
 	
-	QValueList<Oscar::SSI>::const_iterator it, listEnd;
+	d->nextContactId = findFreeId( d->itemIdList, d->nextContactId );
 	
-	for ( ; d->nextContactId < 0x8000; d->nextContactId++ )
+	if ( d->nextContactId == 0xFFFF )
 	{
-		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;
+		kdWarning(OSCAR_RAW_DEBUG) << k_funcinfo << "No free id!" << endl;
+		return 0xFFFF;
 	}
 	
-	kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No free id!" << endl;
-	return 0xFFFF;
+	if ( d->itemIdList.contains( d->nextContactId ) == 0 )
+		d->itemIdList.append( d->nextContactId );
+		
+	return d->nextContactId++;
 }
 
 WORD SSIManager::nextGroupId()
@@ -109,27 +104,18 @@
 	if ( d->nextGroupId == 0 )
 		d->nextGroupId++;
 	
-	QValueList<Oscar::SSI>::const_iterator it, listEnd;
+	d->nextGroupId = findFreeId( d->groupIdList, d->nextGroupId );
 	
-	for ( ; d->nextGroupId < 0x8000; d->nextGroupId++ )
+	if ( d->nextGroupId == 0xFFFF )
 	{
-		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;
+		kdWarning(OSCAR_RAW_DEBUG) << k_funcinfo << "No free group id!" << endl;
+		return 0xFFFF;
 	}
 	
-	kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No free group id!" << endl;
-	return 0xFFFF;
+	if ( d->groupIdList.contains( d->nextGroupId ) == 0 )
+		d->groupIdList.append( d->nextGroupId );
+	
+	return d->nextGroupId++;
 }
 
 WORD SSIManager::numberOfItems() const
@@ -439,6 +425,7 @@
 		kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Adding group '" << group.name() << "' to SSI list" << endl;
 		
 		d->SSIList.append( group );
+		addID( group );
 		emit groupAdded( group );
 		return true;
 	}
@@ -447,6 +434,7 @@
 
 bool SSIManager::updateGroup( const Oscar::SSI& oldGroup, const Oscar::SSI& newGroup )
 {
+	removeID( oldGroup );
 	if ( d->SSIList.remove( oldGroup ) == 0 )
 	{
 		kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No group were removed." << endl;
@@ -461,6 +449,7 @@
 	
 	kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Updating group '" << newGroup.name() << "' in SSI list" << endl;
 	d->SSIList.append( newGroup );
+	addID( newGroup );
 	emit groupUpdated( newGroup );
 	
 	return true;
@@ -471,10 +460,8 @@
 	QString groupName = group.name();
 	kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Removing group " << group.name() << endl;
 	int remcount = d->SSIList.remove( group );
+	removeID( group );
 	
-	if ( d->nextGroupId > group.gid() )
-		d->nextGroupId = group.gid();
-	
 	if ( remcount == 0 )
 	{
 		kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No groups removed" << endl;
@@ -504,6 +491,7 @@
 	if ( d->SSIList.findIndex( contact ) == -1 )
 	{
 		kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Adding contact '" << contact.name() << "' to SSI list" << endl;
+		addID( contact );
 		d->SSIList.append( contact );
 		emit contactAdded( contact );
 	}
@@ -514,6 +502,7 @@
 
 bool SSIManager::updateContact( const Oscar::SSI& oldContact, const Oscar::SSI& newContact )
 {
+	removeID( oldContact );
 	if ( d->SSIList.remove( oldContact ) == 0 )
 	{
 		kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No contacts were removed." << endl;
@@ -527,6 +516,7 @@
 	}
 	
 	kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Updating contact '" << newContact.name() << "' in SSI list" << endl;
+	addID( newContact );
 	d->SSIList.append( newContact );
 	emit contactUpdated( newContact );
 	
@@ -537,10 +527,8 @@
 {
 	QString contactName = contact.name();
 	int remcount = d->SSIList.remove( contact );
+	removeID( contact );
 	
-	if ( d->nextContactId > contact.bid() )
-		d->nextContactId = contact.bid();
-	
 	if ( remcount == 0 )
 	{
 		kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No contacts were removed." << endl;
@@ -568,19 +556,61 @@
 	//no error checking for now
 	kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding item " << item.toString() << endl;
 	d->SSIList.append( item );
+	addID( item );
 	return true;
 }
 
 bool SSIManager::removeItem( const Oscar::SSI& item )
 {
 	d->SSIList.remove( item );
+	removeID( item );
 	
-	if ( d->nextContactId > item.bid() )
-		d->nextContactId = item.bid();
-	
 	return true;
 }
 
+void SSIManager::addID( const Oscar::SSI& item )
+{
+	if ( item.type() == ROSTER_GROUP )
+	{
+		if ( d->groupIdList.contains( item.gid() ) == 0 )
+			d->groupIdList.append( item.gid() );
+	}
+	else
+	{
+		if ( d->itemIdList.contains( item.bid() ) == 0 )
+			d->itemIdList.append( item.bid() );
+	}
+}
+
+void SSIManager::removeID( const Oscar::SSI& item )
+{
+	if ( item.type() == ROSTER_GROUP )
+	{
+		d->groupIdList.remove( item.gid() );
+	
+		if ( d->nextGroupId > item.gid() )
+			d->nextGroupId = item.gid();
+	}
+	else
+	{
+		d->itemIdList.remove( item.bid() );
+		
+		if ( d->nextContactId > item.bid() )
+			d->nextContactId = item.bid();
+	}
+}
+
+WORD SSIManager::findFreeId( const QValueList<WORD>& idList, WORD fromId ) const
+{
+	for ( WORD id = fromId; id < 0x8000; id++ )
+	{
+		if ( idList.contains( id ) == 0 )
+			return id;
+	}
+	
+	return 0xFFFF;
+}
+
 #include "ssimanager.moc"
 
 //kate: tab-width 4; indent-mode csands;
--- branches/kopete/0.12/kopete/protocols/oscar/liboscar/ssimanager.h #566888:566889
@@ -115,6 +115,9 @@
 	bool newItem( const Oscar::SSI& item );
 	bool removeItem( const Oscar::SSI& item );
 
+	void addID( const Oscar::SSI& item );
+	void removeID( const Oscar::SSI& item );
+
 signals:
 	
 	//! Emitted when we've added a new contact to the list
@@ -138,6 +141,8 @@
 	void modifyError( const QString& error );
 	
 private:
+	WORD findFreeId( const QValueList<WORD>& idList, WORD fromId ) const;
+		
 	SSIManagerPrivate* d;
 	Oscar::SSI m_dummyItem;
 };
--- branches/kopete/0.12/kopete/protocols/oscar/liboscar/ssimodifytask.cpp #566888:566889
@@ -216,6 +216,10 @@
 	{
 		WORD ackCode = b->getWord();
 		kdDebug(OSCAR_RAW_DEBUG) << "Acknowledgement code is " << ackCode << endl;
+		
+		if ( ackCode != 0x0000 )
+			freeIdOnError();
+		
 		switch( ackCode )
 		{
 		case 0x0000:
@@ -469,6 +473,31 @@
 	setSuccess( 0, QString::null );
 }
 
+void SSIModifyTask::freeIdOnError()
+{
+	if ( m_oldItem.isValid() && m_newItem.isValid() )
+	{
+		if ( m_opSubject == Contact || m_opSubject == NoSubject )
+		{
+			if ( m_oldItem.bid() != m_newItem.bid() )
+				m_ssiManager->removeID( m_newItem );
+		}
+		else if ( m_opSubject == Group )
+		{
+			if ( m_oldItem.gid() != m_newItem.gid() )
+				m_ssiManager->removeID( m_newItem );
+		}
+	}
+	else if ( m_newItem.isValid() && !m_oldItem )
+	{
+		if ( m_opSubject == Group || m_opSubject == Contact ||
+		     m_opSubject == NoSubject )
+		{
+			m_ssiManager->removeID( m_newItem );
+		}
+	}
+}
+
 void SSIModifyTask::sendEditStart()
 {
 	SNAC editStartSnac = { 0x0013, 0x0011, 0x0000, client()->snacSequence() };
--- branches/kopete/0.12/kopete/protocols/oscar/liboscar/ssimodifytask.h #566888:566889
@@ -118,6 +118,9 @@
 	//! Update the SSI Manager with the new data
 	void updateSSIManager();
 	
+	//! Helper function to free id on error
+	void freeIdOnError();
+		
 	//! Send the SSI edit start packet
 	void sendEditStart();
 	
Comment 23 Roman Jarosz 2006-07-27 15:06:50 UTC
SVN commit 566891 by rjarosz:

Backport: Don't use id of items that are waiting to be sent to server.
Fix adding multiple items at once that was broken by commit 545764.

CCBUG: 104243



 M  +69 -45    ssimanager.cpp  
 M  +5 -0      ssimanager.h  
 M  +29 -0     ssimodifytask.cpp  
 M  +3 -0      ssimodifytask.h  


--- branches/KDE/3.5/kdenetwork/kopete/protocols/oscar/liboscar/ssimanager.cpp #566890:566891
@@ -29,6 +29,8 @@
 {
 public:
 	QValueList<Oscar::SSI> SSIList;
+	QValueList<WORD> groupIdList;
+	QValueList<WORD> itemIdList;
 	WORD lastModTime;
 	WORD maxContacts;
 	WORD maxGroups;
@@ -72,6 +74,8 @@
 			it = d->SSIList.remove( it );
 	};
 	
+	d->itemIdList.clear();
+	d->groupIdList.clear();
 	d->nextContactId = 0;
 	d->nextGroupId = 0;
 }
@@ -81,27 +85,17 @@
 	if ( d->nextContactId == 0 )
 		d->nextContactId++;
 	
-	QValueList<Oscar::SSI>::const_iterator it, listEnd;
-	
-	for ( ; d->nextContactId < 0x8000; d->nextContactId++ )
+	d->nextContactId = findFreeId( d->itemIdList, d->nextContactId );
+	if ( d->nextContactId == 0xFFFF )
 	{
-		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;
+		kdWarning(OSCAR_RAW_DEBUG) << k_funcinfo << "No free id!" << endl;
+		return 0xFFFF;
 	}
 	
-	kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No free id!" << endl;
-	return 0xFFFF;
+	if ( d->itemIdList.contains( d->nextContactId ) == 0 )
+		d->itemIdList.append( d->nextContactId );
+		
+	return d->nextContactId++;
 }
 
 WORD SSIManager::nextGroupId()
@@ -109,27 +103,17 @@
 	if ( d->nextGroupId == 0 )
 		d->nextGroupId++;
 	
-	QValueList<Oscar::SSI>::const_iterator it, listEnd;
-	
-	for ( ; d->nextGroupId < 0x8000; d->nextGroupId++ )
+	d->nextGroupId = findFreeId( d->groupIdList, d->nextGroupId );
+	if ( d->nextGroupId == 0xFFFF )
 	{
-		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;
+		kdWarning(OSCAR_RAW_DEBUG) << k_funcinfo << "No free group id!" << endl;
+		return 0xFFFF;
 	}
 	
-	kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No free group id!" << endl;
-	return 0xFFFF;
+	if ( d->groupIdList.contains( d->nextGroupId ) == 0 )
+		d->groupIdList.append( d->nextGroupId );
+	
+	return d->nextGroupId++;
 }
 
 WORD SSIManager::numberOfItems() const
@@ -428,6 +412,7 @@
 		kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Adding group '" << group.name() << "' to SSI list" << endl;
 		
 		d->SSIList.append( group );
+		addID( group );
 		emit groupAdded( group );
 		return true;
 	}
@@ -439,10 +424,8 @@
 	QString groupName = group.name();
 	kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Removing group " << group.name() << endl;
 	int remcount = d->SSIList.remove( group );
+	removeID( group );
 	
-	if ( d->nextGroupId > group.gid() )
-		d->nextGroupId = group.gid();
-	
 	if ( remcount == 0 )
 	{
 		kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No groups removed" << endl;
@@ -472,6 +455,7 @@
 	if ( d->SSIList.findIndex( contact ) == -1 )
 	{
 		kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Adding contact '" << contact.name() << "' to SSI list" << endl;
+		addID( contact );
 		d->SSIList.append( contact );
 		emit contactAdded( contact );
 	}
@@ -484,10 +468,8 @@
 {
 	QString contactName = contact.name();
 	int remcount = d->SSIList.remove( contact );
+	removeID( contact );
 	
-	if ( d->nextContactId > contact.bid() )
-		d->nextContactId = contact.bid();
-	
 	if ( remcount == 0 )
 	{
 		kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No contacts were removed." << endl;
@@ -515,19 +497,61 @@
 	//no error checking for now
 	kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding item " << item.toString() << endl;
 	d->SSIList.append( item );
+	addID( item );
 	return true;
 }
 
 bool SSIManager::removeItem( const Oscar::SSI& item )
 {
 	d->SSIList.remove( item );
+	removeID( item );
 	
-	if ( d->nextContactId > item.bid() )
-		d->nextContactId = item.bid();
-	
 	return true;
 }
 
+void SSIManager::addID( const Oscar::SSI& item )
+{
+	if ( item.type() == ROSTER_GROUP )
+	{
+		if ( d->groupIdList.contains( item.gid() ) == 0 )
+			d->groupIdList.append( item.gid() );
+	}
+	else
+	{
+		if ( d->itemIdList.contains( item.bid() ) == 0 )
+			d->itemIdList.append( item.bid() );
+	}
+}
+
+void SSIManager::removeID( const Oscar::SSI& item )
+{
+	if ( item.type() == ROSTER_GROUP )
+	{
+		d->groupIdList.remove( item.gid() );
+	
+		if ( d->nextGroupId > item.gid() )
+			d->nextGroupId = item.gid();
+	}
+	else
+	{
+		d->itemIdList.remove( item.bid() );
+		
+		if ( d->nextContactId > item.bid() )
+			d->nextContactId = item.bid();
+	}
+}
+
+WORD SSIManager::findFreeId( const QValueList<WORD>& idList, WORD fromId ) const
+{
+	for ( WORD id = fromId; id < 0x8000; id++ )
+	{
+		if ( idList.contains( id ) == 0 )
+			return id;
+	}
+	
+	return 0xFFFF;
+}
+
 #include "ssimanager.moc"
 
 //kate: tab-width 4; indent-mode csands;
--- branches/KDE/3.5/kdenetwork/kopete/protocols/oscar/liboscar/ssimanager.h #566890:566891
@@ -111,6 +111,9 @@
 	bool newItem( const Oscar::SSI& item );
 	bool removeItem( const Oscar::SSI& item );
 
+	void addID( const Oscar::SSI& item );
+	void removeID( const Oscar::SSI& item );
+
 signals:
 	
 	//! Emitted when we've added a new contact to the list
@@ -128,6 +131,8 @@
 	void modifyError( const QString& error );
 	
 private:
+	WORD findFreeId( const QValueList<WORD>& idList, WORD fromId ) const;
+		
 	SSIManagerPrivate* d;
 	Oscar::SSI m_dummyItem;
 };
--- branches/KDE/3.5/kdenetwork/kopete/protocols/oscar/liboscar/ssimodifytask.cpp #566890:566891
@@ -216,6 +216,10 @@
 	{
 		WORD ackCode = b->getWord();
 		kdDebug(OSCAR_RAW_DEBUG) << "Acknowledgement code is " << ackCode << endl;
+		
+		if ( ackCode != 0x0000 )
+			freeIdOnError();
+		
 		switch( ackCode )
 		{
 		case 0x0000:
@@ -448,6 +452,31 @@
 	setSuccess( 0, QString::null );
 }
 
+void SSIModifyTask::freeIdOnError()
+{
+	if ( m_oldItem.isValid() && m_newItem.isValid() )
+	{
+		if ( m_opSubject == Contact || m_opSubject == NoSubject )
+		{
+			if ( m_oldItem.bid() != m_newItem.bid() )
+				m_ssiManager->removeID( m_newItem );
+		}
+		else if ( m_opSubject == Group )
+		{
+			if ( m_oldItem.gid() != m_newItem.gid() )
+				m_ssiManager->removeID( m_newItem );
+		}
+	}
+	else if ( m_newItem.isValid() && !m_oldItem )
+	{
+		if ( m_opSubject == Group || m_opSubject == Contact ||
+		     m_opSubject == NoSubject )
+		{
+			m_ssiManager->removeID( m_newItem );
+		}
+	}
+}
+
 void SSIModifyTask::sendEditStart()
 {
 	SNAC editStartSnac = { 0x0013, 0x0011, 0x0000, client()->snacSequence() };
--- branches/KDE/3.5/kdenetwork/kopete/protocols/oscar/liboscar/ssimodifytask.h #566890:566891
@@ -118,6 +118,9 @@
 	//! Update the SSI Manager with the new data
 	void updateSSIManager();
 	
+	//! Helper function to free id on error
+	void freeIdOnError();
+		
 	//! Send the SSI edit start packet
 	void sendEditStart();
 	
Comment 24 Richard Homonnai 2006-08-25 13:29:56 UTC
Somehow this bug reoccurs in 0.12.2 again? :(
Comment 25 Roman Jarosz 2006-08-25 13:41:08 UTC
Richard: can you provide a console log?
Comment 26 Richard Homonnai 2006-08-25 14:04:23 UTC
Okay. I recompile right now with debug flags on. For now my system:
It is Gentoo:

Portage 2.1-r2 (default-linux/x86/2005.1, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-gentoo-r4-richWORK-HIGHMEM i686)
=================================================================
System uname: 2.6.17-gentoo-r4-richWORK-HIGHMEM i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.12.4
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy ccache distcc distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://192.168.0.140 ftp://ftp6.uni-muenster.de/pub/linux/distributions/gentoo"
LC_ALL="de_AT.UTF-8"
LINGUAS="de"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--bwlimit=40"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/chain/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="x86 X acpi alsa apm arts avi berkdb bitmap-fonts bluetooth browserplugin cjk connectionstatus cups dbus eds foomaticdb gdbm gif gnokii gpm hal history imlib irmc jingle jpeg kde kdepim koffice-plugins libwww mad memlimit mikmod minimal mmx mmxext mozilla mp3 mpeg musicbrainz ncurses net network nls nowlistening nptl nptlonly nsplugin ogg oggvorbis ooo-kde opengl oss pam parse-clocks pcre pcsc-lite pda pdflib perl pic png pnp ppds python qt qt3 qt4 quicktime readline sasl sdl session smartcard sms sse ssl subversion truetype truetype-fonts type1-fonts udev unicode usb vorbis win32codecs xml2 xorg yahoo zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_de userland_GNU video_cards_sis video_cards_vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS

The version is compiled from a selfmade ebuild, taken from the portage tree, and modified.
The two SVN patches removed and compiled with that.

If I shall take a look anywhere in the source, just tell me.

applied patches against the original 0.12.2 tarball are:

Index: kopete-0.12-alpha1/kopete/libkopete/configure.in.in
===================================================================
--- kopete-0.12-alpha1.orig/kopete/libkopete/configure.in.in
+++ kopete-0.12-alpha1/kopete/libkopete/configure.in.in
@@ -4,7 +4,11 @@ LDFLAGS="$X_LDFLAGS"

 LIB_XSS=

-KDE_CHECK_HEADER(X11/extensions/scrnsaver.h,
+AC_ARG_WITH([xscreensaver],
+  AC_HELP_STRING([--without-xscreensaver], [Disable XScreenSaver support (default: check)]) )
+
+if test "x$with_xscreensaver" != "xno"; then
+  KDE_CHECK_HEADER(X11/extensions/scrnsaver.h,
     [
     AC_CHECK_LIB(Xext,XScreenSaverQueryInfo,
        [
@@ -27,6 +31,7 @@ KDE_CHECK_HEADER(X11/extensions/scrnsave
      [
      #include <X11/Xlib.h>
      ] )
+fi

 AC_SUBST(LIB_XSS)
 LDFLAGS="$xss_save_ldflags"

diff -ur kopete-0.12.1/kopete/plugins/netmeeting.orig/netmeetinginvitation.cpp netmeeting/netmeetinginvitation.cpp
--- kopete-0.12.1/kopete/plugins/netmeeting.orig/netmeetinginvitation.cpp       2006-07-18 16:30:54.000000000 +0200
+++ kopete-0.12.1/kopete/plugins/netmeeting/netmeetinginvitation.cpp    2006-07-18 16:04:51.000000000 +0200
@@ -162,7 +162,7 @@

        KConfig *config=KGlobal::config();
        config->setGroup("Netmeeting Plugin");
-       QString app=config->readEntry("NetmeetingApplication","gnomemeeting -c callto://%1").arg(ip_address);
+       QString app=config->readEntry("NetmeetingApplication","ekiga -c callto://%1").arg(ip_address);

        kdDebug() << k_funcinfo << app <<  endl ;

diff -ur kopete-0.12.1/kopete/plugins/netmeeting.orig/netmeetingpreferences.cpp netmeeting/netmeetingpreferences.cpp
--- kopete-0.12.1/kopete/plugins/netmeeting.orig/netmeetingpreferences.cpp      2006-07-18 16:30:54.000000000 +0200
+++ kopete-0.12.1/kopete/plugins/netmeeting/netmeetingpreferences.cpp   2006-07-18 16:04:51.000000000 +0200
@@ -58,7 +58,7 @@
 {
        KConfig *config=KGlobal::config();
        config->setGroup("Netmeeting Plugin");
-       preferencesDialog->m_app->setCurrentText(config->readEntry("NetmeetingApplication","gnomemeeting -c callto://%1"));
+       preferencesDialog->m_app->setCurrentText(config->readEntry("NetmeetingApplication","ekiga -c callto://%1"));
        emit KCModule::changed(false);
 }

diff -ur kopete-0.12.1/kopete/plugins/netmeeting.orig/netmeetingprefs_ui.ui netmeeting/netmeetingprefs_ui.ui
--- kopete-0.12.1/kopete/plugins/netmeeting.orig/netmeetingprefs_ui.ui  2006-07-18 16:30:54.000000000 +0200
+++ kopete-0.12.1/kopete/plugins/netmeeting/netmeetingprefs_ui.ui       2006-07-18 16:04:51.000000000 +0200
@@ -63,7 +63,7 @@
                 <widget class="KComboBox">
                     <item>
                         <property name="text">
-                            <string>gnomemeeting -c callto://%1</string>
+                            <string>ekiga -c callto://%1</string>
                         </property>
                     </item>
                     <item>

I hope I could help you with this. Recompile will take a time.
Comment 27 Richard Homonnai 2006-08-25 15:37:42 UTC
So, here I am.

kopete (oscar/icq): [virtual bool ICQAddContactPage::apply(Kopete::Account*, Kopete::MetaContact*)] called; adding contact...
kopete (oscar/icq): [virtual bool ICQAddContactPage::apply(Kopete::Account*, Kopete::MetaContact*)] uin=315029252
kopete (oscar): [virtual bool OscarAccount::createContact(const QString&, Kopete::MetaContact*)] New contact '315029252' not in SSI. Creating new contact
kopete (oscar): [virtual bool OscarAccount::createContact(const QString&, Kopete::MetaContact*)] Adding 315029252 to server side list
kopete (oscar): [virtual bool OscarAccount::createContact(const QString&, Kopete::MetaContact*)] Contact with group. No. of groups = 1 Name of first group = v
kopete (oscar - raw protocol): [void Client::addContact(const QString&, const QString&)] Adding contact 315029252 to SSI in group v
kopete (oscar - raw protocol): [bool SSIModifyTask::addContact(const QString&, const QString&, bool)] creating new SSI item for 315029252 in group v
kopete (oscar - raw protocol): [void SSIModifyTask::sendSSIUpdate()] Adding an item to the SSI list
libkopete: [bool Kopete::Account::addContact(const QString&, Kopete::MetaContact*, Kopete::Account::AddMode)]  changing KABC
libkopete: [void Kopete::KABCPersistence::write(Kopete::MetaContact*)] looking up Addressee for ...
kopete (oscar - raw protocol): [void CoreProtocol::addIncomingData(const QByteArray&)] Received 26 bytes.
kopete (oscar - raw protocol): [virtual Transfer* SnacProtocol::parse(const QByteArray&, uint&)] family: 19 subtype: 14 flags: 32768 id: 11245
kopete (oscar - raw protocol): Acknowledgement code is 10
kopete (oscar - raw protocol): [void SSIModifyTask::handleSSIAck()] Error adding item ( invalid id, already in list, invalid data )

This is what it says. Also, at startup next time, in the output it stands in the line "following contacts are not on the server side list" along with many more!
Comment 28 Roman Jarosz 2006-08-25 16:11:56 UTC
Richard: can you add somebody to visible/invisible list and see if that contact will be there when you next time open visibility dialog.
If this works please rename /~/.kde/share/apps/kopete/contactlist.xml file and than start kopete and add a contact that wasn't on your list.

Thanks
Comment 29 Richard Homonnai 2006-08-25 16:28:34 UTC
Add to visible/invisible list worked.
contactlist.xml moved to contactlist.xml.bak

Hey thanks, that solved it. I think I even found the bug!
I miss the group "v". I will try to create this group, and look what's happening!

Yay it works! I just hope I have all contacts now :(

So, the trouble was with my "v" group it seems. It just wasn't created earlier I assume.