Give plugins more control of which configuration attributes to request, and pass received attributes back to the requesting handler
This commit is contained in:
@@ -61,12 +61,16 @@ static bool attr_enum_filter(void *null, attribute_entry_t **in,
|
||||
/**
|
||||
* Implementation of attribute_provider_t.create_attribute_enumerator
|
||||
*/
|
||||
static enumerator_t* create_attribute_enumerator(
|
||||
private_attr_provider_t *this, identification_t *id)
|
||||
static enumerator_t* create_attribute_enumerator(private_attr_provider_t *this,
|
||||
identification_t *id, host_t *vip)
|
||||
{
|
||||
return enumerator_create_filter(
|
||||
if (vip)
|
||||
{
|
||||
return enumerator_create_filter(
|
||||
this->attributes->create_enumerator(this->attributes),
|
||||
(void*)attr_enum_filter, NULL, NULL);
|
||||
}
|
||||
return enumerator_create_empty();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -138,7 +142,7 @@ attr_provider_t *attr_provider_create(database_t *db)
|
||||
|
||||
this->public.provider.acquire_address = (host_t*(*)(attribute_provider_t *this, char*, identification_t *, host_t *))return_null;
|
||||
this->public.provider.release_address = (bool(*)(attribute_provider_t *this, char*,host_t *, identification_t*))return_false;
|
||||
this->public.provider.create_attribute_enumerator = (enumerator_t*(*)(attribute_provider_t*, identification_t *id))create_attribute_enumerator;
|
||||
this->public.provider.create_attribute_enumerator = (enumerator_t*(*)(attribute_provider_t*, identification_t *id, host_t *vip))create_attribute_enumerator;
|
||||
this->public.destroy = (void(*)(attr_provider_t*))destroy;
|
||||
|
||||
this->attributes = linked_list_create();
|
||||
|
||||
Reference in New Issue
Block a user