returning reference pointer on get_ref()

This commit is contained in:
Martin Willi
2008-05-06 10:55:42 +00:00
parent cc0cb93553
commit ff6836716c
6 changed files with 19 additions and 29 deletions
+3 -2
View File
@@ -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);