Terminology and return value of get_lifetime of child_sa_t corrected.
authorTobias Brunner <tobias@strongswan.org>
Thu, 27 Aug 2009 09:46:35 +0000 (11:46 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 1 Sep 2009 10:53:44 +0000 (12:53 +0200)
src/charon/sa/child_sa.c
src/charon/sa/child_sa.h

index 99d1537..7eee9c4 100644 (file)
@@ -507,7 +507,7 @@ static void get_usestats(private_child_sa_t *this, bool inbound,
 /**
  * Implementation of child_sa_t.get_lifetime
  */
-static u_int32_t get_lifetime(private_child_sa_t *this, bool hard)
+static time_t get_lifetime(private_child_sa_t *this, bool hard)
 {
        return hard ? this->expire_time : this->rekey_time;
 }
@@ -895,7 +895,7 @@ child_sa_t * child_sa_create(host_t *me, host_t* other,
        this->public.set_mode = (void(*)(child_sa_t*, ipsec_mode_t mode))set_mode;
        this->public.get_proposal = (proposal_t*(*)(child_sa_t*))get_proposal;
        this->public.set_proposal = (void(*)(child_sa_t*, proposal_t *proposal))set_proposal;
-       this->public.get_lifetime = (u_int32_t(*)(child_sa_t*, bool))get_lifetime;
+       this->public.get_lifetime = (time_t(*)(child_sa_t*, bool))get_lifetime;
        this->public.get_usestats = (void(*)(child_sa_t*,bool,time_t*,u_int64_t*))get_usestats;
        this->public.has_encap = (bool(*)(child_sa_t*))has_encap;
        this->public.get_ipcomp = (ipcomp_transform_t(*)(child_sa_t*))get_ipcomp;
index 698da8b..3931d51 100644 (file)
@@ -229,12 +229,12 @@ struct child_sa_t {
        bool (*has_encap)(child_sa_t *this);
        
        /**
-        * Get the lifetime of the CHILD_SA.
+        * Get the absolute time when the CHILD_SA expires or gets rekeyed.
         *
         * @param hard          TRUE for hard lifetime, FALSE for soft (rekey) lifetime
-        * @return                      lifetime in seconds
+        * @return                      absolute time
         */
-       u_int32_t (*get_lifetime)(child_sa_t *this, bool hard);
+       time_t (*get_lifetime)(child_sa_t *this, bool hard);
        
        /**
         * Get last use time and the number of bytes processed.