Migrate all enumerators to venumerate() interface change
This commit is contained in:
@@ -368,9 +368,12 @@ typedef struct {
|
||||
} attribute_enumerator_t;
|
||||
|
||||
METHOD(enumerator_t, enumerate_attributes, bool,
|
||||
attribute_enumerator_t *this, configuration_attribute_type_t *type,
|
||||
chunk_t *data)
|
||||
attribute_enumerator_t *this, va_list args)
|
||||
{
|
||||
configuration_attribute_type_t *type;
|
||||
chunk_t *data;
|
||||
|
||||
VA_ARGS_VGET(args, type, data);
|
||||
if (this->i < countof(attributes))
|
||||
{
|
||||
*type = attributes[this->i++];
|
||||
@@ -393,7 +396,8 @@ METHOD(attribute_handler_t, create_attribute_enumerator, enumerator_t *,
|
||||
}
|
||||
INIT(enumerator,
|
||||
.public = {
|
||||
.enumerate = (void*)_enumerate_attributes,
|
||||
.enumerate = enumerator_enumerate_default,
|
||||
.venumerate = _enumerate_attributes,
|
||||
.destroy = (void*)free,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -77,12 +77,15 @@ static void append_ts(bio_writer_t *writer, traffic_selector_t *ts)
|
||||
}
|
||||
|
||||
METHOD(enumerator_t, attribute_enumerate, bool,
|
||||
attribute_enumerator_t *this, configuration_attribute_type_t *type,
|
||||
chunk_t *attr)
|
||||
attribute_enumerator_t *this, va_list args)
|
||||
{
|
||||
configuration_attribute_type_t *type;
|
||||
chunk_t *attr;
|
||||
traffic_selector_t *ts;
|
||||
bio_writer_t *writer;
|
||||
|
||||
VA_ARGS_VGET(args, type, attr);
|
||||
|
||||
if (this->list->get_count(this->list) == 0)
|
||||
{
|
||||
return FALSE;
|
||||
@@ -183,7 +186,8 @@ METHOD(attribute_provider_t, create_attribute_enumerator, enumerator_t*,
|
||||
|
||||
INIT(attr_enum,
|
||||
.public = {
|
||||
.enumerate = (void*)_attribute_enumerate,
|
||||
.enumerate = enumerator_enumerate_default,
|
||||
.venumerate = _attribute_enumerate,
|
||||
.destroy = _attribute_destroy,
|
||||
},
|
||||
.list = list,
|
||||
|
||||
Reference in New Issue
Block a user