Changeset 3556


Ignore:
Timestamp:
Oct 25, 2007, 4:52:12 PM (14 years ago)
Author:
livings124
Message:

trunk: Ensure only a single "?" is used for appending arguments to the announce and scrape URL (fixes #411)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEWS

    r3552 r3556  
    330.91 (2007/xx/xx)
    44- libtransmission (all platforms):
    5    + Fix 0.90 socket connection leak.
    6    + Fix 0.90 OpenBSD build error.
     5   + Fix 0.90 socket connection leak
     6   + Fix 0.90 OpenBSD build error
     7   + Ensure only a single "?" is used for appending arguments to the announce and scrape URL
    78- OS X:
    8    + Add Dutch localization, Re-add Russian localization, fix Korean localization
     9   + Fix a crash caused by custom sound files
     10   + Add Dutch localization, re-add Russian localization, fix Korean localization
    911- gtk:
    10    + Fix 0.90 packaging errors.
     12   + Fix 0.90 packaging errors
    1113
    12140.90 (2007/10/23)
  • trunk/libtransmission/tracker.c

    r3505 r3556  
    580580        struct evbuffer * buf = evbuffer_new( );
    581581
    582         evbuffer_add_printf( buf, "%s?info_hash=%s", address->scrape, t->escaped );
     582        evbuffer_add_printf( buf, "%s%sinfo_hash=%s",
     583                             address->scrape,
     584                             ( strchr(address->scrape, '?') == NULL ? "?" : "&" ),
     585                             t->escaped );
    583586        uri = tr_strdup( (char*) EVBUFFER_DATA( buf ) );
    584587        evbuffer_free( buf );
     
    620623    char * ret;
    621624
     625    char * ann = getCurrentAddress(t)->announce;
     626   
    622627    evbuffer_add_printf( buf, "%s"
    623                               "?info_hash=%s"
     628                              "%sinfo_hash=%s"
    624629                              "&peer_id=%s"
    625630                              "&port=%d"
     
    635640                              "%s%s"
    636641                              "%s%s",
    637         getCurrentAddress(t)->announce,
     642        ann,
     643        ( strchr(ann, '?') == NULL ? "?" : "&" ),
    638644        t->escaped,
    639645        t->peer_id,
Note: See TracChangeset for help on using the changeset viewer.