Changeset 13310
- Timestamp:
- May 20, 2012, 2:14:59 PM (9 years ago)
- Location:
- trunk/libtransmission
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/announcer-common.h
r12238 r13310 149 149 150 150 /* the total size of the torrent minus the number of bytes completed */ 151 uint64_t left ;151 uint64_t leftUntilComplete; 152 152 153 153 /* the tracker's announce URL */ -
trunk/libtransmission/announcer-http.c
r13300 r13310 82 82 req->up, 83 83 req->down, 84 req->left ,84 req->leftUntilComplete, 85 85 req->numwant, 86 86 req->key ); -
trunk/libtransmission/announcer-udp.c
r12982 r13310 324 324 evbuffer_add ( buf, in->peer_id, PEER_ID_LEN ); 325 325 evbuffer_add_hton_64( buf, in->down ); 326 evbuffer_add_hton_64( buf, in->left );326 evbuffer_add_hton_64( buf, in->leftUntilComplete ); 327 327 evbuffer_add_hton_64( buf, in->up ); 328 328 evbuffer_add_hton_32( buf, get_tau_announce_event( in->event ) ); -
trunk/libtransmission/announcer.c
r13300 r13310 913 913 req->down = tier->byteCounts[TR_ANN_DOWN]; 914 914 req->corrupt = tier->byteCounts[TR_ANN_CORRUPT]; 915 req->left = tr_cpLeftUntilComplete( &tor->completion ); 915 req->leftUntilComplete = tr_torrentHasMetadata( tor ) 916 ? tor->info.totalSize - tr_cpHaveTotal( &tor->completion ) 917 : ~(uint64_t)0; 916 918 req->event = event; 917 919 req->numwant = event == TR_ANNOUNCE_EVENT_STOPPED ? 0 : NUMWANT; -
trunk/libtransmission/completion.h
r12918 r13310 90 90 } 91 91 92 static inline uint64_t93 tr_cpLeftUntilComplete( const tr_completion * cp )94 {95 return tr_torrentInfo(cp->tor)->totalSize - cp->sizeNow;96 }97 98 92 static inline bool tr_cpHasAll( const tr_completion * cp ) 99 93 {
Note: See TracChangeset
for help on using the changeset viewer.