Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 92698 Details for
Bug 141675
Kopete: Contacts and groups sometimes can't be added to icq/aim server side list
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch from SVN for Kopete 0.12
bug104243_0.12.diff (text/plain), 3.75 KB, created by
Roman Jarosz
on 2006-07-25 01:58:09 UTC
(
hide
)
Description:
Patch from SVN for Kopete 0.12
Filename:
MIME Type:
Creator:
Roman Jarosz
Created:
2006-07-25 01:58:09 UTC
Size:
3.75 KB
patch
obsolete
>Index: kopete/protocols/oscar/liboscar/ssimanager.cpp >=================================================================== >--- kopete/protocols/oscar/liboscar/ssimanager.cpp (revision 565947) >+++ kopete/protocols/oscar/liboscar/ssimanager.cpp (working copy) >@@ -71,18 +71,65 @@ > while ( it != d->SSIList.end() && d->SSIList.count() > 0 ) > it = d->SSIList.remove( it ); > }; >+ >+ d->nextContactId = 0; >+ d->nextGroupId = 0; > } > > WORD SSIManager::nextContactId() > { >- d->nextContactId++; >- return d->nextContactId; >+ if ( d->nextContactId == 0 ) >+ d->nextContactId++; >+ >+ QValueList<Oscar::SSI>::const_iterator it, listEnd; >+ >+ for ( ; d->nextContactId < 0x8000; d->nextContactId++ ) >+ { >+ bool freeId = true; >+ listEnd = d->SSIList.end(); >+ for ( it = d->SSIList.begin(); it != listEnd; ++it ) >+ { >+ if ( ( *it ).bid() == d->nextContactId ) >+ { >+ freeId = false; >+ break; >+ } >+ } >+ >+ if ( freeId ) >+ return d->nextContactId; >+ } >+ >+ kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No free id!" << endl; >+ return 0xFFFF; > } > > WORD SSIManager::nextGroupId() > { >- d->nextGroupId++; >- return d->nextGroupId; >+ if ( d->nextGroupId == 0 ) >+ d->nextGroupId++; >+ >+ QValueList<Oscar::SSI>::const_iterator it, listEnd; >+ >+ for ( ; d->nextGroupId < 0x8000; d->nextGroupId++ ) >+ { >+ bool freeId = true; >+ listEnd = d->SSIList.end(); >+ for ( it = d->SSIList.begin(); it != listEnd; ++it ) >+ { >+ if ( ( *it ).type() == ROSTER_GROUP && ( *it ).gid() == d->nextGroupId ) >+ { >+ freeId = false; >+ break; >+ } >+ } >+ >+ if ( freeId ) >+ return d->nextGroupId; >+ } >+ >+ kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No free group id!" << endl; >+ return 0xFFFF; > } > > WORD SSIManager::numberOfItems() const >@@ -390,8 +437,6 @@ > if ( !group.name().isEmpty() ) //avoid the group with gid 0 and bid 0 > { // the group is really new > kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Adding group '" << group.name() << "' to SSI list" << endl; >- if ( group.gid() > d->nextGroupId ) >- d->nextGroupId = group.gid(); > > d->SSIList.append( group ); > emit groupAdded( group ); >@@ -426,6 +471,10 @@ > QString groupName = group.name(); > kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Removing group " << group.name() << endl; > int remcount = d->SSIList.remove( group ); >+ >+ if ( d->nextGroupId > group.gid() ) >+ d->nextGroupId = group.gid(); >+ > if ( remcount == 0 ) > { > kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No groups removed" << endl; >@@ -452,13 +501,6 @@ > > bool SSIManager::newContact( const Oscar::SSI& contact ) > { >- //what to validate? >- if ( contact.bid() > d->nextContactId ) >- { >- kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Setting next contact ID to " << contact.bid() << endl; >- d->nextContactId = contact.bid(); >- } >- > if ( d->SSIList.findIndex( contact ) == -1 ) > { > kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Adding contact '" << contact.name() << "' to SSI list" << endl; >@@ -496,6 +538,9 @@ > QString contactName = contact.name(); > int remcount = d->SSIList.remove( contact ); > >+ if ( d->nextContactId > contact.bid() ) >+ d->nextContactId = contact.bid(); >+ > if ( remcount == 0 ) > { > kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No contacts were removed." << endl; >@@ -520,12 +565,6 @@ > > bool SSIManager::newItem( const Oscar::SSI& item ) > { >- if ( item.bid() > d->nextContactId ) >- { >- kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Setting next contact ID to " << item.bid() << endl; >- d->nextContactId = item.bid(); >- } >- > //no error checking for now > kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding item " << item.toString() << endl; > d->SSIList.append( item ); >@@ -535,6 +574,10 @@ > bool SSIManager::removeItem( const Oscar::SSI& item ) > { > d->SSIList.remove( item ); >+ >+ if ( d->nextContactId > item.bid() ) >+ d->nextContactId = item.bid(); >+ > return true; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 141675
:
92697
|
92698
|
92982
|
92983