Ignore:
Timestamp:
Jun 24, 2010, 6:25:21 PM (11 years ago)
Author:
charles
Message:

(trunk) #3341 "support alternate tracker syntax in magnet links" -- fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/magnet.c

    r10279 r10841  
    152152                displayName = tr_http_unescape( val, vallen );
    153153
    154             if( ( keylen==2 ) && !memcmp( key, "tr", 2 ) && ( trCount < MAX_TRACKERS ) )
    155                 tr[trCount++] = tr_http_unescape( val, vallen );
     154            if( trCount < MAX_TRACKERS ) {
     155                int i;
     156                if( ( keylen==2 ) && !memcmp( key, "tr", 2 ) )
     157                    tr[trCount++] = tr_http_unescape( val, vallen );
     158                else if( ( sscanf( key, "tr.%d=", &i ) == 1 ) && ( i > 0 ) ) /* ticket #3341 */
     159                    tr[trCount++] = tr_http_unescape( val, vallen );
     160            }
    156161
    157162            if( ( keylen==2 ) && !memcmp( key, "ws", 2 ) && ( wsCount < MAX_TRACKERS ) )
Note: See TracChangeset for help on using the changeset viewer.