Added new statusbar widget about pending discovery informations.

You can enable it in the server settings.
Recompile of GUI needed.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3956 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-01-07 16:56:57 +00:00
parent 3a9181bc85
commit 4b091a54d6
16 changed files with 1100 additions and 873 deletions

View file

@ -283,7 +283,7 @@ void p3disc::sendAllInfoToJustConnectedPeer(const std::string &id)
rsPeers->getFriendList(friendIds);
/* send them a list of all friend's details */
for(friendIdsIt = friendIds.begin(); friendIdsIt != friendIds.end(); friendIdsIt++) {
for(friendIdsIt = friendIds.begin(); friendIdsIt != friendIds.end(); friendIdsIt++) {
/* get details */
peerConnectState detail;
if (!mConnMgr->getFriendNetStatus(*friendIdsIt, detail)) {
@ -1017,6 +1017,29 @@ void p3disc::getversions(std::map<std::string, std::string> &versions)
versions = this->versions;
}
void p3disc::getWaitingDiscCount(unsigned int *sendCount, unsigned int *recvCount)
{
if (sendCount == NULL && recvCount == NULL) {
/* Nothing to do */
return;
}
RsStackMutex stack(mDiscMtx); /********** STACK LOCKED MTX ******/
if (sendCount) {
*sendCount = 0;
std::map<std::string, std::list<std::string> >::iterator it;
for (it = sendIdList.begin(); it != sendIdList.end(); it++) {
*sendCount += it->second.size();
}
}
if (recvCount) {
*recvCount = pendingDiscReplyInList.size();
}
}
int p3disc::idServers()
{
RsStackMutex stack(mDiscMtx); /********** STACK LOCKED MTX ******/

View file

@ -92,6 +92,7 @@ int tick();
bool potentialGPGproxies(const std::string& id, std::list<std::string> &proxyGPGIds);
bool potentialproxies(const std::string& id, std::list<std::string> &proxyIds);
void getversions(std::map<std::string, std::string> &versions);
void getWaitingDiscCount(unsigned int *sendCount, unsigned int *recvCount);
/************* from AuthGPService ****************/
virtual AuthGPGOperation *getGPGOperation();