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:
csoler 2011-07-02 16:24:49 +00:00
parent 8baf2dc33b
commit 477aca2227
4 changed files with 9 additions and 3 deletions

View File

@ -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.

View File

@ -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 ;
}

View File

@ -26,6 +26,7 @@
#include "bitdht/bdquerymgr.h"
#include "bitdht/bdnode.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

View File

@ -25,6 +25,7 @@
#include "util/bdbloom.h"
#include <stdlib.h>
#include <sstream>
#include <iomanip>