aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2007-04-11 12:33:02 +0000
committerMartin Willi <martin@strongswan.org>2007-04-11 12:33:02 +0000
commit015912016c5a7a78ec944902855fae487e66a74a (patch)
tree26706e2ef26518b0786cc6dcb9c2179a5229805e
parenta3ce4bc214c169a068145e234ad0bb6ad18be21b (diff)
downloadstrongswan-015912016c5a7a78ec944902855fae487e66a74a.tar.bz2
strongswan-015912016c5a7a78ec944902855fae487e66a74a.tar.xz
using %V time delta for rekeying times
-rwxr-xr-xsrc/charon/control/stroke_interface.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/charon/control/stroke_interface.c b/src/charon/control/stroke_interface.c
index 80d250681..f47c7b1bb 100755
--- a/src/charon/control/stroke_interface.c
+++ b/src/charon/control/stroke_interface.c
@@ -978,6 +978,7 @@ static void stroke_status(private_stroke_interface_t *this,
child_cfg_t *child_cfg;
ike_sa_t *ike_sa;
char *name = NULL;
+ u_int32_t now = time(NULL);
if (msg->status.name)
{
@@ -1082,12 +1083,12 @@ static void stroke_status(private_stroke_interface_t *this,
ike_sa->get_stats(ike_sa, &next);
if (next)
{
- fprintf(out, "%s in %ds\n", cfg->use_reauth(cfg) ?
- "reauthentication" : "rekeying", next - time(NULL));
+ fprintf(out, "%s in %V\n", cfg->use_reauth(cfg) ?
+ "reauthentication" : "rekeying", &now, &next);
}
else
{
- fprintf(out, "rekeying disabled");
+ fprintf(out, "rekeying disabled\n");
}
}
@@ -1097,14 +1098,13 @@ static void stroke_status(private_stroke_interface_t *this,
if (child_match)
{
- u_int32_t now, rekey;
+ u_int32_t rekey;
u_int32_t use_in, use_out, use_fwd;
encryption_algorithm_t encr_alg;
integrity_algorithm_t int_alg;
size_t encr_len, int_len;
mode_t mode;
- now = time(NULL);
child_sa->get_stats(child_sa, &mode, &encr_alg, &encr_len,
&int_alg, &int_len, &rekey, &use_in, &use_out,
&use_fwd);
@@ -1147,7 +1147,7 @@ static void stroke_status(private_stroke_interface_t *this,
if (rekey)
{
- fprintf(out, "in %ds", rekey - now);
+ fprintf(out, "in %V", &now, &rekey);
}
else
{