Ignore:
Timestamp:
Sep 17, 2009, 1:18:59 AM (13 years ago)
Author:
charles
Message:

when creating a new torrent and a tracker announce URL can't be parsed, set a variable so that the client can learn which announce URL was the bad one

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/makemeta.c

    r8720 r9128  
    380380
    381381    /* allow an empty set, but if URLs *are* listed, verify them. #814, #971 */
    382     for( i = 0; i < builder->trackerCount && !builder->result; ++i )
    383         if( !tr_httpIsValidURL( builder->trackers[i].announce ) )
     382    for( i = 0; i < builder->trackerCount && !builder->result; ++i ) {
     383        if( !tr_httpIsValidURL( builder->trackers[i].announce ) ) {
     384            tr_strlcpy( builder->errfile, builder->trackers[i].announce,
     385                       sizeof( builder->errfile ) );
    384386            builder->result = TR_MAKEMETA_URL;
     387        }
     388    }
    385389
    386390    tr_bencInitDict( &top, 6 );
     
    507511    /* initialize the builder variables */
    508512    builder->abortFlag = 0;
     513    builder->result = 0;
    509514    builder->isDone = 0;
     515    builder->pieceIndex = 0;
    510516    builder->trackerCount = trackerCount;
    511517    builder->trackers = tr_new0( tr_tracker_info, builder->trackerCount );
Note: See TracChangeset for help on using the changeset viewer.