mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-04-22 16:09:18 -04:00
fixed compilation, and removed costly loop
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-peernet@4381 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8baf2dc33b
commit
477aca2227
@ -3,7 +3,7 @@
|
||||
#include "connectstatebox.h"
|
||||
#include "netstatebox.h"
|
||||
|
||||
#include <iostream.h>
|
||||
#include <iostream>
|
||||
|
||||
#define FAILED_WAIT_TIME (1800) // 30 minutes.
|
||||
#define DIRECT_WAIT_TIME (60) // 1 minutes.
|
||||
|
@ -717,16 +717,20 @@ int bdQuery::removeOldPotentialPeers()
|
||||
mFns->bdPrintId(std::cerr, &(it->second.mPeerId));
|
||||
fprintf(stderr, "\n");
|
||||
#endif
|
||||
std::multimap<bdMetric, bdPeer>::iterator it2 = it;
|
||||
++it2 ;
|
||||
mPotentialPeers.erase(it);
|
||||
it = it2 ;
|
||||
|
||||
// Unfortunately have to start again... as pointers invalidated.
|
||||
it = mPotentialPeers.begin();
|
||||
//it = mPotentialPeers.begin();
|
||||
}
|
||||
else
|
||||
{
|
||||
it++;
|
||||
++it;
|
||||
}
|
||||
}
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "bitdht/bdquerymgr.h"
|
||||
#include "bitdht/bdnode.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include "util/bdbloom.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user