mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
new computing for download and upload rate. No more indiv rate settings
Merge branch 'maxUploadRate' git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1293 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9d0f90d434
commit
646603d71d
13 changed files with 381 additions and 542 deletions
|
@ -41,7 +41,7 @@ const int p3facemsgzone = 11453;
|
|||
/* RsIface Config */
|
||||
/* Config */
|
||||
|
||||
int RsServer::ConfigSetDataRates( int total, int indiv ) /* in kbrates */
|
||||
int RsServer::ConfigSetDataRates( int totalDownload, int totalUpload ) /* in kbrates */
|
||||
{
|
||||
/* fill the rsiface class */
|
||||
RsIface &iface = getIface();
|
||||
|
@ -50,10 +50,8 @@ int RsServer::ConfigSetDataRates( int total, int indiv ) /* in kbrates */
|
|||
lockRsCore(); /* LOCK */
|
||||
iface.lockData(); /* LOCK */
|
||||
|
||||
pqih -> setMaxRate(true, total);
|
||||
pqih -> setMaxRate(false, total);
|
||||
pqih -> setMaxIndivRate(true, indiv);
|
||||
pqih -> setMaxIndivRate(false, indiv);
|
||||
pqih -> setMaxRate(true, totalDownload);
|
||||
pqih -> setMaxRate(false, totalUpload);
|
||||
|
||||
pqih -> save_config();
|
||||
|
||||
|
@ -120,8 +118,9 @@ int RsServer::UpdateAllConfig()
|
|||
config.extPort = ntohs(pstate.serveraddr.sin_port);
|
||||
|
||||
/* data rates */
|
||||
config.maxDataRate = (int) pqih -> getMaxRate(true); /* kb */
|
||||
config.maxIndivDataRate = (int) pqih -> getMaxIndivRate(true);/* kb */
|
||||
config.maxDownloadDataRate = (int) pqih -> getMaxRate(true); /* kb */
|
||||
config.maxUploadDataRate = (int) pqih -> getMaxRate(false); /* kb */
|
||||
|
||||
config.promptAtBoot = true; /* popup the password prompt */
|
||||
|
||||
/* update network configuration */
|
||||
|
|
|
@ -137,7 +137,7 @@ class RsServer: public RsControl, public RsThread
|
|||
/* Config */
|
||||
|
||||
virtual int ConfigGetDataRates(float &inKb, float &outKb);
|
||||
virtual int ConfigSetDataRates( int total, int indiv );
|
||||
virtual int ConfigSetDataRates( int totalDownload, int totalUpload );
|
||||
virtual int ConfigSetBootPrompt( bool on );
|
||||
|
||||
virtual void ConfigFinalSave( );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue