[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete/protocols/yahoo/libkyahoo
From: Raphael Kubo da Costa <kubito () gmail ! com>
Date: 2011-01-22 21:13:32
Message-ID: 20110122211332.730AEAC8B9 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1216368 by rkcosta:
Fix a bit sending several outgoing webcam requests + a typo fix that denies in some \
cases sending webcam data.
From the ReviewBoard description:
a) seems like yahoo protocol doesn't send back in the webcam
invitation accepted which person did that. and there is a variable
to remember who we sent the last invite to. Problem would be if
several invites are going to be sent. So, I made the invitation name
to be an invitation *list*. Inspired by code in libpurple.
b) there is a typo when code tries to guess who the 'accepted
invitation' is coming from. I don't have a good way to replicate,
but mostly I suspect it happens when you're sending several
invitations (see point a) ) or when some online<->offline switches
are happening. Concrete side effect is that code tries to connect
to server "".
Patch by Cristi P <cristi.posoiu AT gmail>, thanks a lot!
REVIEW: 6333
M +8 -4 webcamtask.cpp
M +1 -1 webcamtask.h
--- trunk/KDE/kdenetwork/kopete/protocols/yahoo/libkyahoo/webcamtask.cpp \
#1216367:1216368 @@ -80,8 +80,10 @@
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceWebcam);
t->setId( client()->sessionID() );
t->setParam( 1, client()->userId().toLocal8Bit());
+
+ if (!who.isEmpty())
t->setParam( 5, who.toLocal8Bit() );
- keyPending = who;
+ keysPending.append(who);
send( t );
}
@@ -91,7 +93,9 @@
kDebug(YAHOO_RAW_DEBUG) ;
YahooWebcamInformation info;
- info.sender = keyPending;
+ if (!keysPending.isEmpty())
+ info.sender = keysPending.takeFirst();
+
info.server = t->firstParam( 102 );
info.key = t->firstParam( 61 );
info.status = InitialStatus;
@@ -99,7 +103,7 @@
info.buffer = 0L;
info.headerRead = false;
if(info.sender.isEmpty()){
- info.server = t->firstParam( 4 );
+ info.sender = t->firstParam( 4 );
}
if( info.sender == client()->userId() )
{
@@ -551,7 +555,7 @@
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceWebcam);
t->setId( client()->sessionID() );
t->setParam( 1, client()->userId().toLocal8Bit());
- keyPending = client()->userId();
+ keysPending.append(client()->userId());
send( t );
}
--- trunk/KDE/kdenetwork/kopete/protocols/yahoo/libkyahoo/webcamtask.h \
#1216367:1216368 @@ -101,7 +101,7 @@
void processData( KStreamSocket *socket );
void cleanUpConnection( KStreamSocket *socket );
- QString keyPending; // the buddy we have requested the webcam from
+ QStringList keysPending; // time ordered list of users we have requested the webcam \
from SocketInfoMap socketMap;
bool transmittingData;
QStringList pendingInvitations;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic