Changeset 7912


Ignore:
Timestamp:
Feb 18, 2009, 9:27:44 PM (13 years ago)
Author:
charles
Message:

(trunk libT) a little more work on #1829

Location:
trunk/libtransmission
Files:
3 edited

Legend:

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

    r7909 r7912  
    666666{
    667667    struct tr_blockIterator * i = tr_new0( struct tr_blockIterator, 1 );
    668     tordbg( t, "creating new refill queue" );
    669668    i->expirationDate = time( NULL ) + PIECE_LIST_SHELF_LIFE_SECS;
    670669    i->t = t;
    671670    i->pieces = getPreferredPieces( t, &i->pieceCount );
    672671    i->blocks = tr_new0( tr_block_index_t, t->tor->blockCountInPiece );
     672    tordbg( t, "creating new refill queue.. it contains %"PRIu32" pieces", i->pieceCount );
    673673    return i;
    674674}
     
    872872    tr_free( peers );
    873873
    874     /* if we're out of blocks to request, free the request queue */
    875     if( !hasNext )
     874    if( !hasNext ) {
     875        tordbg( t, "refill queue has no more blocks to request... freeing (webseed count: %d, peer count: %d)", webseedCount, peerCount );
    876876        blockIteratorFree( &t->refillQueue );
     877    }
    877878
    878879    t->refillTimer = NULL;
  • trunk/libtransmission/peer-msgs.c

    r7888 r7912  
    854854    }
    855855
    856     /* peer doesn't have this piece */
    857     if( !tr_bitfieldHas( msgs->peer->have, index ) )
    858         return TR_ADDREQ_MISSING;
    859 
    860856    /* peer's queue is full */
    861857    if( requestQueueIsFull( msgs ) ) {
     
    863859        return TR_ADDREQ_FULL;
    864860    }
     861
     862    /* peer doesn't have this piece */
     863    if( !tr_bitfieldHas( msgs->peer->have, index ) )
     864        return TR_ADDREQ_MISSING;
    865865
    866866    /* have we already asked for this piece? */
  • trunk/libtransmission/rpc-server.c

    r7744 r7912  
    417417    else if( req->type == EVHTTP_REQ_POST )
    418418    {
     419fprintf( stderr, "%s\n", (char*)EVBUFFER_DATA(req->input_buffer) );
    419420        tr_rpc_request_exec_json( server->session,
    420421                                  EVBUFFER_DATA( req->input_buffer ),
Note: See TracChangeset for help on using the changeset viewer.