mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-21 15:30:31 -04:00
enabled token expiration, 30 seconds
add new, and hot ranking, and fixed top ranking for posts (not comments yet) top ranking decay period set at 4 seconds for testing enabled ranking posts fixed comments generation git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5989 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7935c5547f
commit
17bdfa7cad
6 changed files with 124 additions and 24 deletions
|
@ -297,6 +297,7 @@ void RsGxsDataAccess::storeRequest(GxsRequest* req)
|
|||
RsStackMutex stack(mDataMutex); /****** LOCKED *****/
|
||||
|
||||
req->status = GXS_REQUEST_V2_STATUS_PENDING;
|
||||
req->reqTime = time(NULL);
|
||||
mRequests[req->token] = req;
|
||||
|
||||
return;
|
||||
|
@ -663,7 +664,7 @@ GxsRequest* RsGxsDataAccess::locked_retrieveRequest(const uint32_t& token)
|
|||
return req;
|
||||
}
|
||||
|
||||
#define MAX_REQUEST_AGE 10
|
||||
#define MAX_REQUEST_AGE 30
|
||||
|
||||
void RsGxsDataAccess::processRequests()
|
||||
{
|
||||
|
@ -749,7 +750,7 @@ void RsGxsDataAccess::processRequests()
|
|||
std::cerr << std::endl;
|
||||
toClear.push_back(req->token);
|
||||
}
|
||||
else if (false/*now - req->reqTime > MAX_REQUEST_AGE*/)
|
||||
else if (now - req->reqTime > MAX_REQUEST_AGE)
|
||||
{
|
||||
std::cerr << "RsGxsDataAccess::processrequests() Clearing Old Request Token: " << req->token;
|
||||
std::cerr << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue