Migrate all enumerators to venumerate() interface change
This commit is contained in:
@@ -435,10 +435,11 @@ struct policy_enumerator_t {
|
||||
};
|
||||
|
||||
METHOD(enumerator_t, policy_enumerate, bool,
|
||||
policy_enumerator_t *this, traffic_selector_t **my_out,
|
||||
traffic_selector_t **other_out)
|
||||
policy_enumerator_t *this, va_list args)
|
||||
{
|
||||
traffic_selector_t *other_ts;
|
||||
traffic_selector_t *other_ts, **my_out, **other_out;
|
||||
|
||||
VA_ARGS_VGET(args, my_out, other_out);
|
||||
|
||||
while (this->ts || this->mine->enumerate(this->mine, &this->ts))
|
||||
{
|
||||
@@ -487,7 +488,8 @@ METHOD(child_sa_t, create_policy_enumerator, enumerator_t*,
|
||||
|
||||
INIT(e,
|
||||
.public = {
|
||||
.enumerate = (void*)_policy_enumerate,
|
||||
.enumerate = enumerator_enumerate_default,
|
||||
.venumerate = _policy_enumerate,
|
||||
.destroy = _policy_destroy,
|
||||
},
|
||||
.mine = array_create_enumerator(this->my_ts),
|
||||
|
||||
@@ -1699,8 +1699,11 @@ typedef struct {
|
||||
} child_enumerator_t;
|
||||
|
||||
METHOD(enumerator_t, child_enumerate, bool,
|
||||
child_enumerator_t *this, child_sa_t **child_sa)
|
||||
child_enumerator_t *this, va_list args)
|
||||
{
|
||||
child_sa_t **child_sa;
|
||||
|
||||
VA_ARGS_VGET(args, child_sa);
|
||||
if (this->inner->enumerate(this->inner, &this->current))
|
||||
{
|
||||
*child_sa = this->current;
|
||||
@@ -1723,7 +1726,8 @@ METHOD(ike_sa_t, create_child_sa_enumerator, enumerator_t*,
|
||||
|
||||
INIT(enumerator,
|
||||
.public = {
|
||||
.enumerate = (void*)_child_enumerate,
|
||||
.enumerate = enumerator_enumerate_default,
|
||||
.venumerate = _child_enumerate,
|
||||
.destroy = _child_enumerator_destroy,
|
||||
},
|
||||
.inner = array_create_enumerator(this->child_sas),
|
||||
|
||||
@@ -513,8 +513,13 @@ struct private_enumerator_t {
|
||||
};
|
||||
|
||||
METHOD(enumerator_t, enumerate, bool,
|
||||
private_enumerator_t *this, entry_t **entry, u_int *segment)
|
||||
private_enumerator_t *this, va_list args)
|
||||
{
|
||||
entry_t **entry;
|
||||
u_int *segment;
|
||||
|
||||
VA_ARGS_VGET(args, entry, segment);
|
||||
|
||||
if (this->entry)
|
||||
{
|
||||
this->entry->condvar->signal(this->entry->condvar);
|
||||
@@ -572,7 +577,8 @@ static enumerator_t* create_table_enumerator(private_ike_sa_manager_t *this)
|
||||
|
||||
INIT(enumerator,
|
||||
.enumerator = {
|
||||
.enumerate = (void*)_enumerate,
|
||||
.enumerate = enumerator_enumerate_default,
|
||||
.venumerate = _enumerate,
|
||||
.destroy = _enumerator_destroy,
|
||||
},
|
||||
.manager = this,
|
||||
|
||||
Reference in New Issue
Block a user