Changeset 6630


Ignore:
Timestamp:
Aug 22, 2008, 4:30:02 PM (13 years ago)
Author:
muks
Message:

Don't move all the rest of peers if current peer is choked

Only move the last peer into place.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r6629 r6630  
    719719            switch( val )
    720720            {
    721                 case TR_ADDREQ_FULL: 
     721                case TR_ADDREQ_FULL:
    722722                case TR_ADDREQ_CLIENT_CHOKED:
    723                     memmove( peers+j, peers+j+1, sizeof(tr_peer*)*(--peerCount-j) );
     723                    memmove( peers+j, peers + --peerCount, sizeof *peers );
    724724                    break;
    725                 case TR_ADDREQ_MISSING: 
    726                 case TR_ADDREQ_DUPLICATE: 
     725                case TR_ADDREQ_MISSING:
     726                case TR_ADDREQ_DUPLICATE:
    727727                    ++j;
    728728                    break;
     
    743743            switch( val )
    744744            {
    745                 case TR_ADDREQ_FULL: 
    746                     memmove( webseeds+j, webseeds+j+1, sizeof(tr_webseed*)*(--webseedCount-j) );
     745                case TR_ADDREQ_FULL:
     746                    memmove( webseeds+j, webseeds + --webseedCount, sizeof *webseeds );
    747747                    break;
    748748                case TR_ADDREQ_OK:
Note: See TracChangeset for help on using the changeset viewer.