Changeset 6183


Ignore:
Timestamp:
Jun 13, 2008, 9:14:43 PM (13 years ago)
Author:
charles
Message:

(1.2x) #971: "transmission can't create torrent with empty Announce URL" backported to 1.2x

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2x/libtransmission/makemeta.c

    r5764 r6183  
    345345    int n = 5;
    346346    tr_benc top;
     347    const char * ann = builder->announce;
    347348
    348349    if ( builder->comment && *builder->comment ) ++n;
    349350    tr_bencInitDict( &top, n );
    350351
    351     tr_bencDictAddStr( &top, "announce", builder->announce );
    352 
    353     if( tr_httpParseURL( builder->announce, -1, NULL, NULL, NULL ) )
     352    tr_bencDictAddStr( &top, "announce", ann );
     353
     354    /* if a URL was entered but it's invalid, don't allow it. #814, #971 */
     355    if( ann && *ann && !tr_httpIsValidURL( ann ) )
    354356        builder->result = TR_MAKEMETA_URL;
    355357   
Note: See TracChangeset for help on using the changeset viewer.