- reworked configuration framework completly
- configuration is now split up in: connections, policies, credentials and daemon config - further alloc/free fixes needed!
This commit is contained in:
@@ -70,6 +70,8 @@ struct private_identification_t {
|
||||
id_type_t type;
|
||||
};
|
||||
|
||||
static private_identification_t *identification_create();
|
||||
|
||||
/**
|
||||
* Implementation of identification_t.get_encoding.
|
||||
*/
|
||||
@@ -113,6 +115,21 @@ static bool equals (private_identification_t *this,private_identification_t *oth
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of identification_t.clone.
|
||||
*/
|
||||
static identification_t *clone(private_identification_t *this)
|
||||
{
|
||||
private_identification_t *clone = identification_create();
|
||||
|
||||
clone->type = this->type;
|
||||
clone->encoded = allocator_clone_chunk(this->encoded);
|
||||
clone->string = allocator_alloc(strlen(this->string) + 1);
|
||||
strcpy(clone->string, this->string);
|
||||
|
||||
return &clone->public;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of identification_t.destroy.
|
||||
*/
|
||||
@@ -136,6 +153,7 @@ static private_identification_t *identification_create()
|
||||
this->public.get_encoding = (chunk_t (*) (identification_t*))get_encoding;
|
||||
this->public.get_type = (id_type_t (*) (identification_t*))get_type;
|
||||
this->public.get_string = (char* (*) (identification_t*))get_string;
|
||||
this->public.clone = (identification_t* (*) (identification_t*))clone;
|
||||
this->public.destroy = (void (*) (identification_t*))destroy;
|
||||
|
||||
this->string = NULL;
|
||||
@@ -144,6 +162,7 @@ static private_identification_t *identification_create()
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Described in header.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user