Ignore:
Timestamp:
Nov 15, 2007, 2:34:48 PM (15 years ago)
Author:
charles
Message:

fix tracker redirect bug reported by sunny

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tracker.c

    r3784 r3826  
    428428    assert( t->addressIndex < t->addressCount );
    429429
    430     return &t->addresses[t->addressIndex];
     430    return t->redirect ? t->redirect
     431                       : t->addresses + t->addressIndex;
    431432}
    432433static int
     
    895896    } else {
    896897        struct evhttp_request * req;
    897         tr_free( t->lastRequest );
    898         t->lastRequest = tr_strdup( eventName );
     898        if( eventName != t->lastRequest ) {
     899            tr_free( t->lastRequest );
     900            t->lastRequest = tr_strdup( eventName );
     901        }
    899902        if( isStopping ) {
    900903            evhttp_connection_set_timeout( evcon, STOP_TIMEOUT_INTERVAL_SEC );
Note: See TracChangeset for help on using the changeset viewer.