rendered paste bodyIndex: libkyahoo/listtask.cpp
===================================================================
--- libkyahoo/listtask.cpp (Revision 660411)
+++ libkyahoo/listtask.cpp (Revision 660413)
@@ -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 )
Index: libkyahoo/ymsgprotocol.cpp
===================================================================
--- libkyahoo/ymsgprotocol.cpp (Revision 660411)
+++ libkyahoo/ymsgprotocol.cpp (Revision 660413)
@@ -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
Index: libkyahoo/listtask.h
===================================================================
--- libkyahoo/listtask.h (Revision 660411)
+++ libkyahoo/listtask.h (Revision 660413)
@@ -41,6 +41,8 @@
signals:
void gotBuddy(const QString&, const QString&, const QString&);
void stealthStatusChanged( const QString&, Yahoo::StealthStatus );
+private:
+ QString m_list;
};
#endif
Index: libkyahoo/coreprotocol.cpp
===================================================================
--- libkyahoo/coreprotocol.cpp (Revision 660411)
+++ libkyahoo/coreprotocol.cpp (Revision 660413)
@@ -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 );