mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-05 23:55:35 -04:00
cleaned the MaxUpRate branch from unused code
This commit is contained in:
parent
83a143476e
commit
ef4455ac9c
4 changed files with 3 additions and 40 deletions
|
@ -39,12 +39,10 @@
|
|||
class SearchModule
|
||||
{
|
||||
public:
|
||||
SearchModule() { mMaxUpRate=0;mMaxDnRate=0;}
|
||||
SearchModule() : pqi(NULL) {}
|
||||
|
||||
RsPeerId peerid ;
|
||||
PQInterface *pqi;
|
||||
uint32_t mMaxUpRate ; // max allowed speeds in kB/s
|
||||
uint32_t mMaxDnRate ;
|
||||
};
|
||||
|
||||
// Presents a P3 Face to the world!
|
||||
|
@ -75,7 +73,7 @@ class pqihandler: public P3Interface, public pqiPublisher
|
|||
#endif
|
||||
|
||||
// rate control.
|
||||
void setMaxRate(const RsPeerId& pid,bool in, uint32_t val_kBs);
|
||||
//void setMaxRate(const RsPeerId& pid,bool in, uint32_t val_kBs);
|
||||
void setMaxRate(bool in, float val);
|
||||
float getMaxRate(bool in);
|
||||
|
||||
|
@ -126,24 +124,6 @@ protected:
|
|||
float ticks_per_sec ;
|
||||
};
|
||||
|
||||
inline void pqihandler::setMaxRate(const RsPeerId& pid,bool in,uint32_t val_kBs)
|
||||
{
|
||||
RsStackMutex stack(coreMtx); /**************** LOCKED MUTEX ****************/
|
||||
|
||||
std::map<RsPeerId, SearchModule *>::iterator it = mods.find(pid);
|
||||
|
||||
if(it == mods.end())
|
||||
{
|
||||
std::cerr << "(EE) no search module for pid " << pid << ": cannot set max rate" << std::endl;
|
||||
return ;
|
||||
}
|
||||
|
||||
if(in)
|
||||
it->second->mMaxDnRate = val_kBs ;
|
||||
else
|
||||
it->second->mMaxUpRate = val_kBs ;
|
||||
}
|
||||
|
||||
inline void pqihandler::setMaxRate(bool in, float val)
|
||||
{
|
||||
RsStackMutex stack(coreMtx); /**************** LOCKED MUTEX ****************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue