* Switched off lots of debugging.

* Tweaks to the transfer rates.


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@824 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-11-18 21:22:58 +00:00
parent 8d3bda4f76
commit c60cf84e95
10 changed files with 44 additions and 17 deletions

View file

@ -44,8 +44,6 @@ const double DMULTIPLEX_RELAX = 0.5; /* ??? */
* #define MPLEX_DEBUG 1
*****/
#define MPLEX_DEBUG 1
ftClient::ftClient(ftTransferModule *module, ftFileCreator *creator)
:mModule(module), mCreator(creator)
{

View file

@ -27,7 +27,9 @@
#include "serialiser/rsconfigitems.h"
#include "util/rsdir.h"
#define DEBUG_ELIST 1
/******
* #define DEBUG_ELIST 1
*****/
ftExtraList::ftExtraList()
:p3Config(CONFIG_TYPE_FT_EXTRA_LIST)

View file

@ -5,8 +5,6 @@
* #define FILE_DEBUG 1
******/
#define FILE_DEBUG 1
#define CHUNK_MAX_AGE 20

View file

@ -49,8 +49,6 @@ const int ftserverzone = 29539;
* #define SERVER_DEBUG 1
***/
#define SERVER_DEBUG 1
/* Setup */
ftServer::ftServer(p3AuthMgr *authMgr, p3ConnectMgr *connMgr)
:mAuthMgr(authMgr), mConnMgr(connMgr)

View file

@ -50,6 +50,10 @@
const double FT_TM_MAX_PEER_RATE = 1024 * 1024; /* 1MB/s */
const uint32_t FT_TM_MAX_RESETS = 5;
const uint32_t FT_TM_MINIMUM_CHUNK = 1024; /* ie 1Kb / sec */
const uint32_t FT_TM_RESTART_DOWNLOAD = 20; /* 20 seconds */
const uint32_t FT_TM_DOWNLOAD_TIMEOUT = 18; /* 18 seconds */
ftTransferModule::ftTransferModule(ftFileCreator *fc, ftDataMultiplex *dm, ftController *c)
:mFileCreator(fc), mMultiplexor(dm), mFtController(c), mFlag(0)
{
@ -500,9 +504,6 @@ void ftTransferModule::adjustSpeed()
*
**/
const uint32_t FT_TM_MINIMUM_CHUNK = 1024; /* ie 1Kb / sec */
const uint32_t FT_TM_RESTART_DOWNLOAD = 10; /* 10 seconds */
const uint32_t FT_TM_DOWNLOAD_TIMEOUT = 5; /* 5 seconds */
/* NOTEs on this function...
* 1) This is the critical function for deciding the rate at which ft takes place.
@ -574,7 +575,7 @@ bool ftTransferModule::locked_tickPeerTransfer(peerInfo &info)
info.lastTransfers = 0;
/* request at 10% more than actual rate */
uint32_t next_req = info.actualRate * 1.1;
uint32_t next_req = info.actualRate * 1.25;
if (next_req > info.desiredRate * 1.1)
next_req = info.desiredRate * 1.1;