mirror of
https://github.com/transmission/transmission
synced 2024-12-24 16:52:39 +00:00
assorted small cleanup and log removal
This commit is contained in:
parent
5af45426d4
commit
14da64ec06
3 changed files with 6 additions and 8 deletions
|
@ -516,8 +516,8 @@ tr_http_escape( struct evbuffer * out,
|
|||
for( i = 0; i < len; i++ ) {
|
||||
if( str[i] == ',' || str[i] == '-' || str[i] == '.'
|
||||
|| ( '0' <= str[i] && str[i] <= '9' )
|
||||
|| ( 'a' <= str[i] && str[i] <= 'z' )
|
||||
|| ( 'A' <= str[i] && str[i] <= 'Z' )
|
||||
|| ( 'a' <= str[i] && str[i] <= 'z' )
|
||||
|| ( str[i] == '/' && !escape_slashes ) )
|
||||
evbuffer_add( out, &str[i], 1 );
|
||||
else
|
||||
|
|
|
@ -1745,9 +1745,10 @@ typedef enum
|
|||
|
||||
NSIndexSet * selectedIndexes = [fTrackerTable selectedRowIndexes];
|
||||
BOOL groupSelected = NO;
|
||||
for (NSUInteger i = 0, trackerIndex = 0; i < [fTrackers count]; ++i)
|
||||
for (NSUInteger i = 0; i < [fTrackers count]; ++i)
|
||||
{
|
||||
if ([[fTrackers objectAtIndex: i] isKindOfClass: [NSNumber class]])
|
||||
id object = [fTrackers objectAtIndex: i];
|
||||
if ([object isKindOfClass: [NSNumber class]])
|
||||
{
|
||||
groupSelected = [selectedIndexes containsIndex: i];
|
||||
if (!groupSelected && i > [selectedIndexes lastIndex])
|
||||
|
@ -1756,13 +1757,10 @@ typedef enum
|
|||
else
|
||||
{
|
||||
if (groupSelected || [selectedIndexes containsIndex: i])
|
||||
[removeIdentifiers addIndex: [(TrackerNode *)[fTrackers objectAtIndex: i] identifier]];
|
||||
++trackerIndex;
|
||||
[removeIdentifiers addIndex: [(TrackerNode *)object identifier]];
|
||||
}
|
||||
}
|
||||
|
||||
NSLog(@"%@", removeIdentifiers);
|
||||
|
||||
NSAssert([removeIdentifiers count] > 0, @"Trying to remove no trackers.");
|
||||
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey: @"WarningRemoveTrackers"])
|
||||
|
|
|
@ -636,7 +636,7 @@ int trashDataFile(const char * filename)
|
|||
|
||||
trackerStructs[oldTrackerCount].announce = (char *)[tracker UTF8String];
|
||||
trackerStructs[oldTrackerCount].tier = trackerStructs[oldTrackerCount-1].tier + 1;
|
||||
trackerStructs[oldTrackerCount].identifier = trackerStructs[oldTrackerCount-1].identifier + 1;
|
||||
trackerStructs[oldTrackerCount].identifier = oldTrackerCount;
|
||||
|
||||
const BOOL success = tr_torrentSetAnnounceList(fHandle, trackerStructs, oldTrackerCount+1);
|
||||
tr_free(trackerStructs);
|
||||
|
|
Loading…
Reference in a new issue