mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-20 03:48:16 -04:00
merge of branch v0.6-idclean 7180
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7187 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7815efb16f
commit
0f29d28b1b
397 changed files with 6503 additions and 5702 deletions
|
@ -92,12 +92,12 @@ int p3BandwidthControl::status()
|
|||
bool p3BandwidthControl::checkAvailableBandwidth()
|
||||
{
|
||||
/* check each connection status */
|
||||
std::map<std::string, RsBwRates> rateMap;
|
||||
std::map<RsPeerId, RsBwRates> rateMap;
|
||||
RsBwRates total;
|
||||
|
||||
mPg->ExtractRates(rateMap, total);
|
||||
std::map<std::string, RsBwRates>::iterator it;
|
||||
std::map<std::string, BwCtrlData>::iterator bit;
|
||||
std::map<RsPeerId, RsBwRates>::iterator it;
|
||||
std::map<RsPeerId, BwCtrlData>::iterator bit;
|
||||
|
||||
/* have to merge with existing list,
|
||||
* erasing as we go ... then any left have to deal with
|
||||
|
@ -107,7 +107,7 @@ bool p3BandwidthControl::checkAvailableBandwidth()
|
|||
mTotalRates = total;
|
||||
|
||||
time_t now = time(NULL);
|
||||
std::list<std::string> oldIds; // unused for now!
|
||||
std::list<RsPeerId> oldIds; // unused for now!
|
||||
|
||||
for(bit = mBwMap.begin(); bit != mBwMap.end(); bit++)
|
||||
{
|
||||
|
@ -189,7 +189,7 @@ bool p3BandwidthControl::processIncoming()
|
|||
|
||||
/* For each packet */
|
||||
RsStackMutex stack(mBwMtx); /****** LOCKED MUTEX *******/
|
||||
std::map<std::string, BwCtrlData>::iterator bit;
|
||||
std::map<RsPeerId, BwCtrlData>::iterator bit;
|
||||
|
||||
bit = mBwMap.find(bci->PeerId());
|
||||
if (bit == mBwMap.end())
|
||||
|
@ -231,11 +231,11 @@ int p3BandwidthControl::getTotalBandwidthRates(RsConfigDataRates &rates)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int p3BandwidthControl::getAllBandwidthRates(std::map<std::string, RsConfigDataRates> &ratemap)
|
||||
int p3BandwidthControl::getAllBandwidthRates(std::map<RsPeerId, RsConfigDataRates> &ratemap)
|
||||
{
|
||||
RsStackMutex stack(mBwMtx); /****** LOCKED MUTEX *******/
|
||||
|
||||
std::map<std::string, BwCtrlData>::iterator bit;
|
||||
std::map<RsPeerId, BwCtrlData>::iterator bit;
|
||||
for(bit = mBwMap.begin(); bit != mBwMap.end(); bit++)
|
||||
{
|
||||
RsConfigDataRates rates;
|
||||
|
@ -279,7 +279,7 @@ int p3BandwidthControl::printRateInfo_locked(std::ostream &out)
|
|||
out << " MaxOut: " << mTotalRates.mMaxRateOut;
|
||||
out << std::endl;
|
||||
|
||||
std::map<std::string, BwCtrlData>::iterator bit;
|
||||
std::map<RsPeerId, BwCtrlData>::iterator bit;
|
||||
for(bit = mBwMap.begin(); bit != mBwMap.end(); bit++)
|
||||
{
|
||||
out << "\t" << bit->first;
|
||||
|
@ -305,7 +305,7 @@ void p3BandwidthControl::statusChange(const std::list<pqipeer> &plist)
|
|||
if (it->actions & RS_PEER_DISCONNECTED)
|
||||
{
|
||||
/* remove from map */
|
||||
std::map<std::string, BwCtrlData>::iterator bit;
|
||||
std::map<RsPeerId, BwCtrlData>::iterator bit;
|
||||
bit = mBwMap.find(it->id);
|
||||
if (bit == mBwMap.end())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue