Ignore:
Timestamp:
Nov 24, 2009, 2:16:31 AM (12 years ago)
Author:
charles
Message:

(trunk) #2096: Magnet, BEP #9 support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/completion.c

    r8212 r9550  
    1717#include "completion.h"
    1818#include "torrent.h"
     19#include "torrent-magnet.h"
    1920#include "utils.h"
    2021
     
    241242tr_cpGetStatus( const tr_completion * cp )
    242243{
     244    if( !tr_torrentHasMetadata( cp->tor ) ) return TR_LEECH;
    243245    if( cp->sizeNow == cp->tor->info.totalSize ) return TR_SEED;
    244246    if( cp->sizeNow == tr_cpSizeWhenDone( cp ) ) return TR_PARTIAL_SEED;
     
    255257    const uint64_t            lastPieceSize  = tor->lastPieceSize;
    256258    const tr_piece_index_t    lastPiece      = tor->info.pieceCount - 1;
     259
     260    if( !tr_torrentHasMetadata( tor ) )
     261        return 0;
    257262
    258263    for( i=0; i!=lastPiece; ++i )
Note: See TracChangeset for help on using the changeset viewer.