Changeset 9600
- Timestamp:
- Nov 27, 2009, 2:27:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peer-mgr.c
r9593 r9600 3022 3022 struct peer_atom ** keep = tr_new( struct peer_atom*, atomCount ); 3023 3023 struct peer_atom ** test = tr_new( struct peer_atom*, atomCount ); 3024 tordbg( t, "max atom count is %d; have %d.. pruning\n", maxAtomCount, atomCount );3025 3024 3026 3025 /* keep the ones that are in use */ … … 3050 3049 t->pool = TR_PTR_ARRAY_INIT; 3051 3050 qsort( keep, keepCount, sizeof( struct peer_atom * ), compareAtomPtrsByAddress ); 3052 for( i=0; i<keepCount; ++i ) { 3053 if( i+1<keepCount ) 3054 assert( tr_compareAddresses( &keep[i]->addr, &keep[i+1]->addr ) < 0 ); 3051 for( i=0; i<keepCount; ++i ) 3055 3052 tr_ptrArrayAppend( &t->pool, keep[i] ); 3056 } 3053 3054 tordbg( t, "max atom count is %d... pruned from %d to %d\n", maxAtomCount, atomCount, keepCount ); 3057 3055 3058 3056 /* cleanup */
Note: See TracChangeset
for help on using the changeset viewer.