diff options
author | Tobias Brunner <tobias@strongswan.org> | 2009-08-28 17:04:35 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2009-09-01 12:54:33 +0200 |
commit | e75f4237536a84938ac1b33f143d63512710ff29 (patch) | |
tree | 5745c3ca28ebaced87c1b56dff1194815b64266a /src/charon/plugins/sql/sql_config.c | |
parent | abff49a7ffd0b4941ec302e587b2701327f32864 (diff) | |
download | strongswan-e75f4237536a84938ac1b33f143d63512710ff29.tar.bz2 strongswan-e75f4237536a84938ac1b33f143d63512710ff29.tar.xz |
Refactored the lifetime_cfg_t struct to be simpler and more expressive. Initialization is now static.
Diffstat (limited to 'src/charon/plugins/sql/sql_config.c')
-rw-r--r-- | src/charon/plugins/sql/sql_config.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/charon/plugins/sql/sql_config.c b/src/charon/plugins/sql/sql_config.c index 71fb378df..67b5c3b64 100644 --- a/src/charon/plugins/sql/sql_config.c +++ b/src/charon/plugins/sql/sql_config.c @@ -130,9 +130,10 @@ static child_cfg_t *build_child_cfg(private_sql_config_t *this, enumerator_t *e) if (e->enumerate(e, &id, &name, &lifetime, &rekeytime, &jitter, &updown, &hostaccess, &mode, &dpd, &close, &ipcomp)) { - lifetime_cfg_t *lft = lifetime_cfg_create_time(lifetime, rekeytime, - jitter); - child_cfg = child_cfg_create(name, lft, updown, hostaccess, mode, + lifetime_cfg_t lft = { + .time = { .life = lifetime, .rekey = rekeytime, .jitter = jitter } + }; + child_cfg = child_cfg_create(name, &lft, updown, hostaccess, mode, dpd, close, ipcomp); /* TODO: read proposal from db */ child_cfg->add_proposal(child_cfg, proposal_create_default(PROTO_ESP)); |