aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/config/child_cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/charon/config/child_cfg.c')
-rw-r--r--src/charon/config/child_cfg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/charon/config/child_cfg.c b/src/charon/config/child_cfg.c
index e85814237..2c7201972 100644
--- a/src/charon/config/child_cfg.c
+++ b/src/charon/config/child_cfg.c
@@ -401,9 +401,10 @@ static diffie_hellman_group_t get_dh_group(private_child_cfg_t *this)
/**
* Implementation of child_cfg_t.get_name
*/
-static void get_ref(private_child_cfg_t *this)
+static child_cfg_t* get_ref(private_child_cfg_t *this)
{
ref_get(&this->refcount);
+ return &this->public;
}
/**
@@ -448,7 +449,7 @@ child_cfg_t *child_cfg_create(char *name, u_int32_t lifetime,
this->public.get_close_action = (action_t (*) (child_cfg_t *))get_close_action;
this->public.get_lifetime = (u_int32_t (*) (child_cfg_t *,bool))get_lifetime;
this->public.get_dh_group = (diffie_hellman_group_t(*)(child_cfg_t*)) get_dh_group;
- this->public.get_ref = (void (*) (child_cfg_t*))get_ref;
+ this->public.get_ref = (child_cfg_t* (*) (child_cfg_t*))get_ref;
this->public.destroy = (void (*) (child_cfg_t*))destroy;
this->name = strdup(name);