debug and logging improvements

This commit is contained in:
Martin Willi
2006-06-13 10:01:04 +00:00
parent 22ff6f578f
commit fa32cd3c47
8 changed files with 43 additions and 16 deletions
+4
View File
@@ -332,6 +332,10 @@ static void add_proposal(private_policy_t *this, proposal_t *proposal)
*/
static u_int32_t get_soft_lifetime(private_policy_t *this)
{
if (this->jitter == 0)
{
return this->soft_lifetime ;
}
srandom(time(NULL)+getpid());
return this->soft_lifetime - (random() % this->jitter);
}