Changeset 1128


Ignore:
Timestamp:
Nov 24, 2006, 7:44:35 PM (15 years ago)
Author:
livings124
Message:

handle scrape addresses which already have a query string appended

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/scrape/libtransmission/tracker.c

    r1127 r1128  
    150150   
    151151    if (!tc->scrapeNeeded)
    152         interval *= 2.0;
     152    {
     153        interval *= 2;
     154    }
    153155   
    154156    return now > tc->dateOkScrape + interval;
     
    216218        tc->dateTryScrape = tr_date();
    217219        tc->httpScrape = tr_httpClient( TR_HTTP_GET, inf->trackerAddress, inf->trackerPort,
    218                           "%s?info_hash=%s", tor->scrape, tor->hashString );
     220                            "%s%sinfo_hash=%s", tor->scrape, strchr( tor->scrape, '?' ) ?
     221                            "&" : "?", inf->hashString );
    219222        tr_inf( "Scrape: sent http request to %s:%d",
    220223                    inf->trackerAddress, inf->trackerPort );
Note: See TracChangeset for help on using the changeset viewer.