From 58ec8a3b199bf80fae54956e56c6b371def658a6 Mon Sep 17 00:00:00 2001 From: Eric Petit Date: Sat, 8 Apr 2006 15:56:26 +0000 Subject: [PATCH] Show tracker errors again --- libtransmission/transmission.c | 1 + macosx/Torrent.m | 10 ++++------ macosx/TorrentCell.m | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/libtransmission/transmission.c b/libtransmission/transmission.c index e84bae9af..2bb5c4437 100644 --- a/libtransmission/transmission.c +++ b/libtransmission/transmission.c @@ -394,6 +394,7 @@ tr_stat_t * tr_torrentStat( tr_torrent_t * tor ) tr_lockLock( &tor->lock ); s->status = tor->status; + s->error = tor->error; memcpy( s->trackerError, tor->trackerError, sizeof( s->trackerError ) ); diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 28d279bd3..7cb621d9a 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -144,14 +144,12 @@ break; } -#if 0 - if( ( stat->status & ( TR_STATUS_DOWNLOAD | TR_STATUS_SEED ) ) && - ( stat->status & TR_TRACKER_ERROR ) ) + if( fStat->error & TR_ETRACKER ) { - fPeersString = [NSString stringWithFormat: @"%@%@", - @"Error: ", [NSString stringWithUTF8String: stat->error]]; + [fInfoString setString: @"Error: "]; + [fInfoString appendString: [NSString + stringWithUTF8String: fStat->trackerError]]; } -#endif [fUploadString setString: @""]; if( fStat->progress == 1.0 ) diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index 9b861d70c..97c295100 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -314,7 +314,7 @@ static uint32_t kGreen[] = [[fTorrent statusString] drawAtPoint: pen withAttributes: attributes]; pen.y += 13; string = [[fTorrent infoString] stringFittingInWidth: - ( cellFrame.size.width - 77 ) withAttributes: attributes]; + ( fWidth - 80 ) withAttributes: attributes]; [string drawAtPoint: pen withAttributes: attributes]; /* Rates */