Added Identity Info retrieval to rsIdentities.

This is now pretty much complete for Phase 1 of GXS.
Still todo:
	- PGPHash signatures.
	- Reputations.

 - Added two helper classes GxsTokenQueue: similar to TokenQueue, but for libretroshare
       & RsTickEvent: schedule one shot events, and basic stats.
 - Reorganised/simplified p3IdService using these two classes.
 - Added fns to load/reload a list of Own Identities.
 - Improved the Cache to store all GUI required Info.
 - Updater retroshare/rsidentity.h with new Identity interface.
 - added fns to update Cache from internal background tasks.
 - Modified RsMemCache to support replace operation.
 - Found nasty Bug that caused PGPHASHes not to match & Patched same bug in GXS.
 - added generic CacheArbitration.
 - Added AuthorIds to dummy Forum messages.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5848 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2012-11-19 22:00:05 +00:00
parent 6e349749d0
commit c6e6d444bf
13 changed files with 1096 additions and 491 deletions

View file

@ -133,20 +133,22 @@ template<class Key, class Value> bool RsMemCache<Key, Value>::store(const Key &k
std::cerr << "RsMemCache::store()";
std::cerr << std::endl;
/* update lrumap entry */
time_t old_ts = 0;
time_t new_ts = time(NULL);
// For consistency
typename std::map<Key, cache_data>::const_iterator it;
it = mDataMap.find(key);
if (it != mDataMap.end())
{
// ERROR.
std::cerr << "RsMemCache::store() ERROR entry exists already";
std::cerr << "RsMemCache::store() WARNING overriding existing entry";
std::cerr << std::endl;
return false;
old_ts = it->second.ts;
}
/* add new lrumap entry */
time_t old_ts = 0;
time_t new_ts = time(NULL);
mDataMap[key] = cache_data(key, data, new_ts);
mDataCount++;