Bug 138376 - kopete does not list all contacts in my yahoo buddy list groups
Summary: kopete does not list all contacts in my yahoo buddy list groups
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: Yahoo Plugin (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 143191 143653 146965 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-05 06:42 UTC by Richard Oszlanczi
Modified: 2007-06-19 16:08 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
yahoo groups as seen in gaim (watch group 'Veniti cu noi') (12.95 KB, image/jpeg)
2006-12-05 06:44 UTC, Richard Oszlanczi
Details
yahoo groups as seen in kopete (watch group 'Veniti cu noi') (16.99 KB, image/jpeg)
2006-12-05 06:45 UTC, Richard Oszlanczi
Details
kopete debug messages on connection (263.39 KB, text/plain)
2006-12-06 21:00 UTC, Richard Oszlanczi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Oszlanczi 2006-12-05 06:42:34 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Ubuntu Packages
OS:                Linux

kopete does not list all contacts in my yahoo buddy list groups. 

For example I have a group that contains 25 buddies. When I connect with kopete it shows that the group only has 3 buddies in it. And even then, the third buddy is just the first two caracters from the id of the buddy (meaning it is not a correct id). 

When a buddy from this group connects it is put in a new group (I don't remember the name exactly, something like 'contacts not in your messenger list')
Comment 1 Richard Oszlanczi 2006-12-05 06:44:35 UTC
Created attachment 18790 [details]
yahoo groups as seen in gaim (watch group 'Veniti cu noi')
Comment 2 Richard Oszlanczi 2006-12-05 06:45:36 UTC
Created attachment 18791 [details]
yahoo groups as seen in kopete (watch group 'Veniti cu noi')
Comment 3 Andre Duffeck 2006-12-06 12:22:38 UTC
Could you please compile kopete with debug enabled and paste the debug messages of the login procedure? Thanks.
Comment 4 Richard Oszlanczi 2006-12-06 21:00:12 UTC
Created attachment 18822 [details]
kopete debug messages on connection

Looks like the contacts arrive in 2 packets and the second packet is not added
to the buddy list.

I got the kopete sources (0.12.3) from Kubuntu Edgy repository. Kopete on the
Edgy live cd has the same issues.

I've also tested the Dapper live cd (with Kopete 0.11.1) and that version loads
the entire buddy list.
Comment 5 Andre Duffeck 2006-12-07 14:58:17 UTC
Thats great, thank you.
Comment 6 Abe Ezekowitz 2007-03-01 18:40:52 UTC
I have this same bug in Kopete version 0.12.4 using Kubuntu Edgy Eft with KDE 3.5.6
Comment 7 Andre Duffeck 2007-03-18 21:51:50 UTC
*** Bug 143191 has been marked as a duplicate of this bug. ***
Comment 8 Andre Duffeck 2007-03-31 09:38:29 UTC
*** Bug 143653 has been marked as a duplicate of this bug. ***
Comment 9 Andrei Nistor 2007-05-02 14:24:41 UTC
I'm experiencing this bug too... I only see 15 out of 173, with the 15'th one truncated...
Comment 10 Andre Duffeck 2007-05-02 18:52:32 UTC
SVN commit 660412 by duffeck:

Fix loss of contacts on large contact lists.
BUG:138376


 M  +1 -1      coreprotocol.cpp  
 M  +5 -4      listtask.cpp  
 M  +2 -0      listtask.h  
 M  +5 -4      ymsgprotocol.cpp  


--- branches/KDE/3.5/kdenetwork/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp #660411:660412
@@ -184,7 +184,7 @@
 		}
 		else 
 		{ 
-			kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << " - not a valid YMSG packet. Trying to recover." << endl;
+			kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << " - not a valid YMSG packet. Trying to recover: " << wire << endl;
 			QTextStream s( wire, IO_ReadOnly );
 			QString remaining = s.read();
 			int pos = remaining.find( "YMSG", bytesParsed );
--- branches/KDE/3.5/kdenetwork/kopete/protocols/yahoo/libkyahoo/listtask.cpp #660411:660412
@@ -69,13 +69,13 @@
 	kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << endl;
 
 	QString raw;
-	raw = t->firstParam( 87 );
-	
-	if( raw.isEmpty() )
+	m_list.append( t->firstParam( 87 ) );
+
+	if( t->firstParam( 59 ).isEmpty() )
 		return;
 
 	QStringList groups;
-	groups = QStringList::split( "\n", raw );
+	groups = QStringList::split( "\n", m_list );
 
 	for ( QStringList::Iterator groupIt = groups.begin(); groupIt != groups.end(); ++groupIt ) 
 	{
@@ -88,6 +88,7 @@
 			emit gotBuddy( *buddyIt, QString::null, group );
 		}
 	}
+	m_list.truncate( 0 );
 }
 
 void ListTask::parseStealthList( YMSGTransfer *t )
--- branches/KDE/3.5/kdenetwork/kopete/protocols/yahoo/libkyahoo/listtask.h #660411:660412
@@ -41,6 +41,8 @@
 signals:
 	void gotBuddy(const QString&, const QString&, const QString&);
 	void stealthStatusChanged( const QString&, Yahoo::StealthStatus );
+private:
+	QString m_list;
 };
 
 #endif
--- branches/KDE/3.5/kdenetwork/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp #660411:660412
@@ -357,9 +357,10 @@
 			if (accept)
 				value[x++] = data[pos++];
 		}
-		if (accept)
+		if (accept) {
 			value[x] = 0;
-		pos += 2;
+			pos += 2;
+		}
 
 		if (accept) 
 		{
@@ -375,8 +376,8 @@
 	}
 
 	// Packets consisting of several YMSG-packets sometimes contain padding chars (0x00) -> filter out
- 	while( (BYTE)data[pos] == (BYTE) 0x00 && pos <= len + 20)
- 		pos++;
+	while( (BYTE)data[pos] == (BYTE) 0x00 && pos <= len + 20)
+		pos++;
 
 	kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << " Returning transfer" << endl;
 	// tell them we have parsed offset bytes
Comment 11 Andre Duffeck 2007-06-19 16:08:47 UTC
*** Bug 146965 has been marked as a duplicate of this bug. ***