Ignore:
Timestamp:
Dec 5, 2006, 12:14:52 AM (15 years ago)
Author:
livings124
Message:

initial support for announce-list (currently crashes when a tracker fails)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/multitracker/libtransmission/transmission.c

    r1149 r1154  
    302302    tor->bindPort = &h->bindPort;
    303303        tor->finished = 0;
    304 
    305 
    306     /* Guess scrape URL */
    307     s1 = strchr( inf->trackerAnnounce, '/' );
    308     while( ( s2 = strchr( s1 + 1, '/' ) ) )
    309     {
    310         s1 = s2;
    311     }
    312     s1++;
    313     if( !strncmp( s1, "announce", 8 ) )
    314     {
    315         int pre  = (long) s1 - (long) inf->trackerAnnounce;
    316         int post = strlen( inf->trackerAnnounce ) - pre - 8;
    317         memcpy( tor->scrape, inf->trackerAnnounce, pre );
    318         sprintf( &tor->scrape[pre], "scrape" );
    319         memcpy( &tor->scrape[pre+6], &inf->trackerAnnounce[pre+8], post );
    320     }
    321304
    322305    /* Escaped info hash for HTTP queries */
Note: See TracChangeset for help on using the changeset viewer.