[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenetwork/kopete/protocols/oscar
From: Matt Rogers <mattr () kde ! org>
Date: 2005-04-02 3:21:37
Message-ID: 20050402032137.EB972490 () office ! kde ! org
[Download RAW message or body]
CVS commit by mattr:
Fixes to make the connection to the icon server.
M +2 -2 aim/aimcontact.cpp 1.73
M +1 -2 liboscar/buddyicontask.cpp 1.2
M +16 -9 liboscar/client.cpp 1.12
M +5 -0 liboscar/connectionlist.cpp 1.2
M +3 -3 liboscar/serverredirecttask.cpp 1.3
--- kdenetwork/kopete/protocols/oscar/aim/aimcontact.cpp #1.72:1.73
@@ -175,6 +175,6 @@ void AIMContact::userInfoUpdated( const
}
-// if ( details.buddyIconHash() != m_details.buddyIconHash() )
-// account()->engine()->getBuddyIcon( contactId() );
+ if ( details.buddyIconHash() != m_details.buddyIconHash() )
+ account()->engine()->requestBuddyIcon( contactId(), \
m_details.buddyIconHash() );
OscarContact::userInfoUpdated( contact, details );
--- kdenetwork/kopete/protocols/oscar/liboscar/buddyicontask.cpp #1.1:1.2
@@ -110,5 +110,5 @@ bool BuddyIconTask::take( Transfer* tran
void BuddyIconTask::sendAIMBuddyIconRequest()
{
- FLAP f = { 0x02, 0, client()->flapSequence() };
+ FLAP f = { 0x02, client()->flapSequence(), 0 };
SNAC s = { 0x0010, 0x0004, 0x0000, client()->snacSequence() };
Buffer* b = new Buffer;
@@ -122,5 +122,4 @@ void BuddyIconTask::sendAIMBuddyIconRequ
Transfer* t = createTransfer( f, s, b );
send( t );
- delete( t );
}
--- kdenetwork/kopete/protocols/oscar/liboscar/client.cpp #1.11:1.12
@@ -71,4 +71,5 @@ public:
//Protocol specific data
bool isIcq;
+ bool redirectRequested;
QByteArray cookie;
DWORD connectAsStatus; // icq only
@@ -103,4 +104,5 @@ Client::Client( QObject* parent )
d->active = false;
d->isIcq = false; //default to AIM
+ d->redirectRequested = false;
d->connectAsStatus = 0x0; // default to online
d->ssiManager = new SSIManager( this );
@@ -722,9 +724,14 @@ void Client::requestBuddyIcon( const QSt
void Client::requestServerRedirect( WORD family )
{
+ if ( d->redirectRequested == false )
+ {
+ d->redirectRequested = true;
ServerRedirectTask* srt = new ServerRedirectTask( \
d->connections.bosConnection()->rootTask() );
connect( srt, SIGNAL( haveServer( const QString&, const QByteArray&, WORD ) \
),
- this, SLOT( haveServerForRedirect( const \
QString&, const QByteArray& cookie, WORD ) ) ); + this, SLOT( \
haveServerForRedirect( const QString&, const QByteArray&, WORD ) ) ); \
srt->setService( family ); srt->go( true );
+ }
+
}
@@ -743,8 +750,8 @@ void Client::haveServerForRedirect( cons
realHost = host;
realPort = QString::fromLatin1("5190");
-}
+ }
Connection* c = createConnection( realHost, realPort );
-
+ d->connections.registerIconConnection( c );
//create the new login task
m_loginTaskTwo = new StageTwoLoginTask( c->rootTask() );
@@ -754,5 +761,5 @@ void Client::haveServerForRedirect( cons
//connect
- connectToServer( c, d->host, false ) ;
+ connectToServer( c, d->host, false );
QObject::connect( c, SIGNAL( connected() ), this, SLOT( streamConnected() ) \
); }
--- kdenetwork/kopete/protocols/oscar/liboscar/connectionlist.cpp #1.1:1.2
@@ -87,4 +87,9 @@ void ConnectionList::registerAuthConnect
}
+void ConnectionList::registerIconConnection( Connection* iconConnection )
+{
+ m_iconConnection = iconConnection;
+}
+
void ConnectionList::removeConnection( Connection* connection )
{
--- kdenetwork/kopete/protocols/oscar/liboscar/serverredirecttask.cpp #1.2:1.3
@@ -66,11 +66,11 @@ bool ServerRedirectTask::take( Transfer*
void ServerRedirectTask::requestNewService()
{
- FLAP f = { 0x02, 0x00, client()->flapSequence() };
+ FLAP f = { 0x02, client()->flapSequence(), 0x00 };
SNAC s = { 0x0001, 0x0004, 0x0000, client()->snacSequence() };
- Buffer* b = new Buffer;
+ Buffer* b = new Buffer();
b->addWord( m_service );
+ kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Requesting server for service " \
<< m_service << endl; Transfer* t = createTransfer( f, s, b );
send( t );
- delete t;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic