CVS commit by ogoffart: With my rework of MSNP2P i broke the sending of image (which anyway doesn't worked with the official client) This make it works again kopete <=> kopete M +17 -17 msnp2p.cpp 1.25 --- kdenetwork/kopete/protocols/msn/msnp2p.cpp #1.24:1.25 @@ -41,4 +41,16 @@ +static QString randomid() +{ + return QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" + + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" + + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" + + QString::number(rand()%0xAAFF+0x1111, 16) + "-" + + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16); +} + @@ -804,20 +816,6 @@ void MSNP2PDisplatcher::requestDisplayPi - p2p->m_branch= QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" - + QString::number(rand()%0xAAFF+0x1111, 16) + "-" - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16); - p2p->m_CallID= QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-" - + QString::number(rand()%0xAAFF+0x1111, 16) + "-" - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) - + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16); + p2p->m_branch=randomid(); + p2p->m_CallID=randomid(); msnObject=QString::fromUtf8(KCodecs::base64Encode( msnObject.utf8() )); @@ -950,4 +948,6 @@ void MSNP2PDisplatcher::sendImage(const p2p->m_msgHandle=m_msgHandle; p2p->m_myHandle=m_myHandle; + p2p->m_branch=randomid(); + p2p->m_CallID=randomid(); //Send the OK message. @@ -960,5 +960,5 @@ void MSNP2PDisplatcher::sendImage(const p2p->m_offset=0; p2p->m_totalDataSize= toSend.size(); - QTimer::singleShot( 10, this, SLOT(slotSendData()) ); //Go for upload + QTimer::singleShot( 10, p2p, SLOT(slotSendData()) ); //Go for upload }