Changeset 1278


Ignore:
Timestamp:
Dec 26, 2006, 4:17:37 AM (15 years ago)
Author:
livings124
Message:

support manual announcing to tracker (as in user forces an announce) in libT...when implemented in a front end it should limit the use of this

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tracker.c

    r1272 r1278  
    9393static void        setAnnounce      ( tr_tracker_t * tc, tr_announce_list_ptr_t * announceItem );
    9494static void        failureAnnouncing( tr_tracker_t * tc );
     95void               trackerPulse     ( tr_tracker_t *, int );
    9596static tr_http_t * getQuery         ( tr_tracker_t * tc );
    9697static tr_http_t * getScrapeQuery   ( tr_tracker_t * tc );
     
    323324}
    324325
    325 void tr_trackerPulse( tr_tracker_t * tc )
     326void trackerPulse( tr_tracker_t * tc, int manual )
    326327{
    327328    tr_torrent_t * tor = tc->tor;
     
    331332    int            len, i, port;
    332333    tr_announce_list_ptr_t * announcePtr, * prevAnnouncePtr;
    333 
    334     if( ( NULL == tc->http ) && shouldConnect( tc ) )
    335     {
     334   
     335    if( ( NULL == tc->http ) && ( manual || shouldConnect( tc ) ) )
     336    {
     337        if( manual )
     338        {
     339            tc->allUnreachIfError = 0;
     340        }
    336341        tc->completelyUnconnectable = 0;
     342       
    337343        tc->randOffset = tr_rand( 60000 );
    338344       
  • trunk/libtransmission/tracker.h

    r1243 r1278  
    3030tr_tracker_t * tr_trackerInit      ( tr_torrent_t * );
    3131void           tr_trackerChangePort( tr_tracker_t *, int );
    32 void           tr_trackerPulse     ( tr_tracker_t * );
     32
     33#define tr_trackerPulse( tc ) trackerPulse( (tc), 0 )
     34#define tr_trackerPulseManual( tc ) trackerPulse( (tc), 1 )
     35
    3336void           tr_trackerCompleted ( tr_tracker_t * );
    3437void           tr_trackerStopped   ( tr_tracker_t * );
Note: See TracChangeset for help on using the changeset viewer.