mirror of
https://github.com/transmission/transmission
synced 2025-03-03 18:25:35 +00:00
(trunk) #3341 "support alternate tracker syntax in magnet links" -- fixed
This commit is contained in:
parent
a54270a11a
commit
5a0d9351d2
1 changed files with 7 additions and 2 deletions
|
@ -151,8 +151,13 @@ tr_magnetParse( const char * uri )
|
|||
if( ( keylen==2 ) && !memcmp( key, "dn", 2 ) )
|
||||
displayName = tr_http_unescape( val, vallen );
|
||||
|
||||
if( ( keylen==2 ) && !memcmp( key, "tr", 2 ) && ( trCount < MAX_TRACKERS ) )
|
||||
tr[trCount++] = tr_http_unescape( val, vallen );
|
||||
if( trCount < MAX_TRACKERS ) {
|
||||
int i;
|
||||
if( ( keylen==2 ) && !memcmp( key, "tr", 2 ) )
|
||||
tr[trCount++] = tr_http_unescape( val, vallen );
|
||||
else if( ( sscanf( key, "tr.%d=", &i ) == 1 ) && ( i > 0 ) ) /* ticket #3341 */
|
||||
tr[trCount++] = tr_http_unescape( val, vallen );
|
||||
}
|
||||
|
||||
if( ( keylen==2 ) && !memcmp( key, "ws", 2 ) && ( wsCount < MAX_TRACKERS ) )
|
||||
ws[wsCount++] = tr_http_unescape( val, vallen );
|
||||
|
|
Loading…
Reference in a new issue