From be85dc0fac3d32656340ed4244f9ca5b6e556d20 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 22 Nov 2009 01:12:44 +0000 Subject: [PATCH] a couple of more swarm speed removals --- doc/rpc-spec.txt | 1 - libtransmission/peer-msgs.c | 2 -- libtransmission/torrent.c | 4 ---- libtransmission/torrent.h | 2 -- qt/torrent.cc | 1 - qt/torrent.h | 2 -- 6 files changed, 12 deletions(-) diff --git a/doc/rpc-spec.txt b/doc/rpc-spec.txt index 81bdf5edc..91262929a 100644 --- a/doc/rpc-spec.txt +++ b/doc/rpc-spec.txt @@ -178,7 +178,6 @@ sizeWhenDone | number | tr_stat startDate | number | tr_stat status | number | tr_stat - swarmSpeed (K/s) | number | tr_stat trackers | array (see below) | n/a trackerStats | array (see below) | n/a totalSize | number | tr_info diff --git a/libtransmission/peer-msgs.c b/libtransmission/peer-msgs.c index 0bc841f9a..5d36671e9 100644 --- a/libtransmission/peer-msgs.c +++ b/libtransmission/peer-msgs.c @@ -1291,8 +1291,6 @@ readBtMessage( tr_peermsgs * msgs, struct evbuffer * inbuf, size_t inlen ) return READ_ERR; } updatePeerProgress( msgs ); - tr_rcTransferred( &msgs->torrent->swarmSpeed, - msgs->torrent->info.pieceSize ); break; case BT_BITFIELD: diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index 0a49c7199..4ab71444b 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -624,8 +624,6 @@ torrentRealInit( tr_torrent * tor, const tr_ctor * ctor ) tr_torrentInitFilePieces( tor ); - tr_rcConstruct( &tor->swarmSpeed ); - tr_sha1( tor->obfuscatedHash, "req2", 4, info->hash, SHA_DIGEST_LENGTH, NULL ); @@ -1259,8 +1257,6 @@ freeTorrent( tr_torrent * tor ) tr_cpDestruct( &tor->completion ); - tr_rcDestruct( &tor->swarmSpeed ); - tr_announcerUnsubscribe( tor->tiers, tor->tiersSubscription ); tr_announcerRemoveTorrent( session->announcer, tor ); diff --git a/libtransmission/torrent.h b/libtransmission/torrent.h index 735bb5fd2..b2d6ad1ab 100644 --- a/libtransmission/torrent.h +++ b/libtransmission/torrent.h @@ -136,8 +136,6 @@ struct tr_torrent tr_session * session; tr_info info; - struct tr_ratecontrol swarmSpeed; - int magicNumber; tr_stat_errtype error; diff --git a/qt/torrent.cc b/qt/torrent.cc index 3ffb8c987..888db7ab5 100644 --- a/qt/torrent.cc +++ b/qt/torrent.cc @@ -55,7 +55,6 @@ Torrent :: myProperties[] = { ID, "id", QVariant::Int, INFO, }, { UPLOAD_SPEED, "rateUpload", QVariant::Int, STAT } /* B/s */, { DOWNLOAD_SPEED, "rateDownload", QVariant::Int, STAT }, /* B/s */ - { SWARM_SPEED, "swarmSpeed", QVariant::Int, STAT_EXTRA },/* KB/s */ { DOWNLOAD_DIR, "downloadDir", QVariant::String, STAT }, { ACTIVITY, "status", QVariant::Int, STAT }, { NAME, "name", QVariant::String, INFO }, diff --git a/qt/torrent.h b/qt/torrent.h index 47d2383cf..9fc12a3bf 100644 --- a/qt/torrent.h +++ b/qt/torrent.h @@ -85,7 +85,6 @@ class Torrent: public QObject ID, UPLOAD_SPEED, DOWNLOAD_SPEED, - SWARM_SPEED, DOWNLOAD_DIR, ACTIVITY, NAME, @@ -251,7 +250,6 @@ class Torrent: public QObject int connectedPeersAndWebseeds( ) const { return connectedPeers( ) + getInt( WEBSEEDS_SENDING_TO_US ); } Speed downloadSpeed( ) const { return Speed::fromBps( getInt( DOWNLOAD_SPEED ) ); } Speed uploadSpeed( ) const { return Speed::fromBps( getInt( UPLOAD_SPEED ) ); } - Speed swarmSpeed( ) const { return Speed::fromKbps( getInt( SWARM_SPEED ) ); } double getVerifyProgress( ) const { return getDouble( PERCENT_VERIFIED ); } bool hasFileSubstring( const QString& substr ) const; bool hasTrackerSubstring( const QString& substr ) const;