mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 14:45:12 -04:00
* 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:
parent
8d3bda4f76
commit
c60cf84e95
10 changed files with 44 additions and 17 deletions
|
@ -39,7 +39,6 @@
|
||||||
/***********
|
/***********
|
||||||
* #define FIM_DEBUG 1
|
* #define FIM_DEBUG 1
|
||||||
***********/
|
***********/
|
||||||
#define FIM_DEBUG 1
|
|
||||||
|
|
||||||
FileIndexMonitor::FileIndexMonitor(CacheStrapper *cs, std::string cachedir, std::string pid)
|
FileIndexMonitor::FileIndexMonitor(CacheStrapper *cs, std::string cachedir, std::string pid)
|
||||||
:CacheSource(RS_SERVICE_TYPE_FILE_INDEX, false, cs, cachedir), fi(pid),
|
:CacheSource(RS_SERVICE_TYPE_FILE_INDEX, false, cs, cachedir), fi(pid),
|
||||||
|
|
|
@ -44,8 +44,6 @@ const double DMULTIPLEX_RELAX = 0.5; /* ??? */
|
||||||
* #define MPLEX_DEBUG 1
|
* #define MPLEX_DEBUG 1
|
||||||
*****/
|
*****/
|
||||||
|
|
||||||
#define MPLEX_DEBUG 1
|
|
||||||
|
|
||||||
ftClient::ftClient(ftTransferModule *module, ftFileCreator *creator)
|
ftClient::ftClient(ftTransferModule *module, ftFileCreator *creator)
|
||||||
:mModule(module), mCreator(creator)
|
:mModule(module), mCreator(creator)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
#include "serialiser/rsconfigitems.h"
|
#include "serialiser/rsconfigitems.h"
|
||||||
#include "util/rsdir.h"
|
#include "util/rsdir.h"
|
||||||
|
|
||||||
#define DEBUG_ELIST 1
|
/******
|
||||||
|
* #define DEBUG_ELIST 1
|
||||||
|
*****/
|
||||||
|
|
||||||
ftExtraList::ftExtraList()
|
ftExtraList::ftExtraList()
|
||||||
:p3Config(CONFIG_TYPE_FT_EXTRA_LIST)
|
:p3Config(CONFIG_TYPE_FT_EXTRA_LIST)
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
* #define FILE_DEBUG 1
|
* #define FILE_DEBUG 1
|
||||||
******/
|
******/
|
||||||
|
|
||||||
#define FILE_DEBUG 1
|
|
||||||
|
|
||||||
#define CHUNK_MAX_AGE 20
|
#define CHUNK_MAX_AGE 20
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,6 @@ const int ftserverzone = 29539;
|
||||||
* #define SERVER_DEBUG 1
|
* #define SERVER_DEBUG 1
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#define SERVER_DEBUG 1
|
|
||||||
|
|
||||||
/* Setup */
|
/* Setup */
|
||||||
ftServer::ftServer(p3AuthMgr *authMgr, p3ConnectMgr *connMgr)
|
ftServer::ftServer(p3AuthMgr *authMgr, p3ConnectMgr *connMgr)
|
||||||
:mAuthMgr(authMgr), mConnMgr(connMgr)
|
:mAuthMgr(authMgr), mConnMgr(connMgr)
|
||||||
|
|
|
@ -50,6 +50,10 @@
|
||||||
const double FT_TM_MAX_PEER_RATE = 1024 * 1024; /* 1MB/s */
|
const double FT_TM_MAX_PEER_RATE = 1024 * 1024; /* 1MB/s */
|
||||||
const uint32_t FT_TM_MAX_RESETS = 5;
|
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)
|
ftTransferModule::ftTransferModule(ftFileCreator *fc, ftDataMultiplex *dm, ftController *c)
|
||||||
:mFileCreator(fc), mMultiplexor(dm), mFtController(c), mFlag(0)
|
: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...
|
/* NOTEs on this function...
|
||||||
* 1) This is the critical function for deciding the rate at which ft takes place.
|
* 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;
|
info.lastTransfers = 0;
|
||||||
|
|
||||||
/* request at 10% more than actual rate */
|
/* 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)
|
if (next_req > info.desiredRate * 1.1)
|
||||||
next_req = info.desiredRate * 1.1;
|
next_req = info.desiredRate * 1.1;
|
||||||
|
|
|
@ -35,8 +35,6 @@
|
||||||
* #define CONFIG_DEBUG 1
|
* #define CONFIG_DEBUG 1
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#define CONFIG_DEBUG 1
|
|
||||||
|
|
||||||
p3ConfigMgr::p3ConfigMgr(p3AuthMgr *am, std::string dir, std::string fname, std::string signame)
|
p3ConfigMgr::p3ConfigMgr(p3AuthMgr *am, std::string dir, std::string fname, std::string signame)
|
||||||
:mAuthMgr(am), basedir(dir), metafname(fname), metasigfname(signame),
|
:mAuthMgr(am), basedir(dir), metafname(fname), metasigfname(signame),
|
||||||
mConfigSaveActive(true)
|
mConfigSaveActive(true)
|
||||||
|
|
|
@ -48,8 +48,6 @@ const int p3dhtzone = 3892;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DHT_DEBUG 1
|
|
||||||
|
|
||||||
/**** DHT State Variables ****/
|
/**** DHT State Variables ****/
|
||||||
|
|
||||||
#define DHT_STATE_OFF 0
|
#define DHT_STATE_OFF 0
|
||||||
|
|
|
@ -27,7 +27,7 @@ ifndef MAC_I386_BUILD
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# flags for components....
|
# flags for components....
|
||||||
#PQI_USE_XPGP = 1
|
PQI_USE_XPGP = 1
|
||||||
#PQI_USE_PROXY = 1
|
#PQI_USE_PROXY = 1
|
||||||
#PQI_USE_CHANNELS = 1
|
#PQI_USE_CHANNELS = 1
|
||||||
#USE_FILELOOK = 1
|
#USE_FILELOOK = 1
|
||||||
|
|
35
libretroshare/src/scripts/makeMacUniversalLibrary.sh
Executable file
35
libretroshare/src/scripts/makeMacUniversalLibrary.sh
Executable file
|
@ -0,0 +1,35 @@
|
||||||
|
#
|
||||||
|
## clean up all bits of libretroshare
|
||||||
|
echo make clobber
|
||||||
|
make clobber
|
||||||
|
#
|
||||||
|
## make the standard version (PPC)
|
||||||
|
echo make
|
||||||
|
make
|
||||||
|
#
|
||||||
|
LIB=libretroshare.a
|
||||||
|
LIB_PPC=libretroshare_ppc.a
|
||||||
|
LIB_X86=libretroshare_x86.a
|
||||||
|
|
||||||
|
MAC_SCRIPT="./scripts/config-macosx.mk"
|
||||||
|
|
||||||
|
echo cp lib/$LIB lib/$LIB_PPC
|
||||||
|
cp lib/$LIB lib/$LIB_PPC
|
||||||
|
|
||||||
|
echo make clobber
|
||||||
|
make clobber
|
||||||
|
|
||||||
|
echo make "MAC_I386_BUILD=1"
|
||||||
|
make "MAC_I386_BUILD=1"
|
||||||
|
|
||||||
|
echo cp lib/$LIB lib/$LIB_X86
|
||||||
|
cp lib/$LIB lib/$LIB_X86
|
||||||
|
|
||||||
|
# magic combine trick.
|
||||||
|
echo cd lib
|
||||||
|
cd lib
|
||||||
|
|
||||||
|
echo lipo -create libretroshare_*.a -output $LIB
|
||||||
|
lipo -create libretroshare_*.a -output $LIB
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue