Changeset 5953


Ignore:
Timestamp:
May 27, 2008, 9:55:57 PM (13 years ago)
Author:
charles
Message:

#971: transmission can't create torrent with empty "Announce URL"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/makemeta.c

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