summaryrefslogtreecommitdiff
path: root/src/libcharon/config/peer_cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/config/peer_cfg.c')
-rw-r--r--src/libcharon/config/peer_cfg.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/libcharon/config/peer_cfg.c b/src/libcharon/config/peer_cfg.c
index 5d7ab076e..fcdd6fdeb 100644
--- a/src/libcharon/config/peer_cfg.c
+++ b/src/libcharon/config/peer_cfg.c
@@ -209,9 +209,12 @@ typedef struct {
} child_cfgs_replace_enumerator_t;
METHOD(enumerator_t, child_cfgs_replace_enumerate, bool,
- child_cfgs_replace_enumerator_t *this, child_cfg_t **chd, bool *added)
+ child_cfgs_replace_enumerator_t *this, va_list args)
{
- child_cfg_t *child_cfg;
+ child_cfg_t *child_cfg, **chd;
+ bool *added;
+
+ VA_ARGS_VGET(args, chd, added);
if (!this->wrapped)
{
@@ -303,8 +306,9 @@ METHOD(peer_cfg_t, replace_child_cfgs, enumerator_t*,
INIT(enumerator,
.public = {
- .enumerate = (void*)_child_cfgs_replace_enumerate,
- .destroy = (void*)_child_cfgs_replace_enumerator_destroy,
+ .enumerate = enumerator_enumerate_default,
+ .venumerate = _child_cfgs_replace_enumerate,
+ .destroy = _child_cfgs_replace_enumerator_destroy,
},
.removed = removed,
.added = added,
@@ -336,8 +340,11 @@ METHOD(enumerator_t, child_cfg_enumerator_destroy, void,
}
METHOD(enumerator_t, child_cfg_enumerate, bool,
- child_cfg_enumerator_t *this, child_cfg_t **chd)
+ child_cfg_enumerator_t *this, va_list args)
{
+ child_cfg_t **chd;
+
+ VA_ARGS_VGET(args, chd);
return this->wrapped->enumerate(this->wrapped, chd);
}
@@ -348,8 +355,9 @@ METHOD(peer_cfg_t, create_child_cfg_enumerator, enumerator_t*,
INIT(enumerator,
.public = {
- .enumerate = (void*)_child_cfg_enumerate,
- .destroy = (void*)_child_cfg_enumerator_destroy,
+ .enumerate = enumerator_enumerate_default,
+ .venumerate = _child_cfg_enumerate,
+ .destroy = _child_cfg_enumerator_destroy,
},
.mutex = this->mutex,
.wrapped = this->child_cfgs->create_enumerator(this->child_cfgs),