Changeset 12416 for trunk/libtransmission/metainfo.c
- Timestamp:
- May 5, 2011, 3:10:51 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/metainfo.c
r12293 r12416 371 371 372 372 for( i = 0; i < n; ++i ) 373 { 373 374 if( tr_bencGetStr( tr_bencListChild( urls, i ), &url ) ) 374 inf->webseeds[inf->webseedCount++] = tr_strdup( url ); 375 { 376 const size_t len = strlen( url ); 377 378 if( tr_urlIsValid( url, len ) ) 379 inf->webseeds[inf->webseedCount++] = tr_strndup( url, len ); 380 } 381 } 375 382 } 376 383 else if( tr_bencDictFindStr( meta, "url-list", &url ) ) /* handle single items in webseeds */ 377 384 { 378 inf->webseedCount = 1; 379 inf->webseeds = tr_new0( char*, 1 ); 380 inf->webseeds[0] = tr_strdup( url ); 385 const size_t len = strlen( url ); 386 387 if( tr_urlIsValid( url, len ) ) 388 { 389 inf->webseedCount = 1; 390 inf->webseeds = tr_new0( char*, 1 ); 391 inf->webseeds[0] = tr_strndup( url, len ); 392 } 381 393 } 382 394 }
Note: See TracChangeset
for help on using the changeset viewer.