use more generic stats getter, introducing new stats

This commit is contained in:
Martin Willi
2008-10-27 14:51:00 +00:00
parent ddc5b90db2
commit 85ac2fa547
4 changed files with 61 additions and 79 deletions
+2 -1
View File
@@ -47,9 +47,10 @@ static void add_auth_lifetime(private_ike_auth_lifetime_t *this, message_t *mess
chunk_t chunk;
u_int32_t lifetime;
lifetime = this->ike_sa->get_statistic(this->ike_sa, STAT_REAUTH_TIME);
lifetime = this->ike_sa->get_statistic(this->ike_sa, STAT_REAUTH);
if (lifetime)
{
lifetime -= time(NULL);
chunk = chunk_from_thing(lifetime);
*(u_int32_t*)chunk.ptr = htonl(lifetime);
message->add_notify(message, FALSE, AUTH_LIFETIME, chunk);