summaryrefslogtreecommitdiff
path: root/src/libcharon/encoding/payloads
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/encoding/payloads')
-rw-r--r--src/libcharon/encoding/payloads/certreq_payload.c9
-rw-r--r--src/libcharon/encoding/payloads/delete_payload.c9
-rw-r--r--src/libcharon/encoding/payloads/eap_payload.c9
3 files changed, 21 insertions, 6 deletions
diff --git a/src/libcharon/encoding/payloads/certreq_payload.c b/src/libcharon/encoding/payloads/certreq_payload.c
index 09bfa2458..643fbc42f 100644
--- a/src/libcharon/encoding/payloads/certreq_payload.c
+++ b/src/libcharon/encoding/payloads/certreq_payload.c
@@ -190,8 +190,12 @@ struct keyid_enumerator_t {
};
METHOD(enumerator_t, keyid_enumerate, bool,
- keyid_enumerator_t *this, chunk_t *chunk)
+ keyid_enumerator_t *this, va_list args)
{
+ chunk_t *chunk;
+
+ VA_ARGS_VGET(args, chunk);
+
if (this->pos == NULL)
{
this->pos = this->full.ptr;
@@ -224,7 +228,8 @@ METHOD(certreq_payload_t, create_keyid_enumerator, enumerator_t*,
}
INIT(enumerator,
.public = {
- .enumerate = (void*)_keyid_enumerate,
+ .enumerate = enumerator_enumerate_default,
+ .venumerate = _keyid_enumerate,
.destroy = (void*)free,
},
.full = this->data,
diff --git a/src/libcharon/encoding/payloads/delete_payload.c b/src/libcharon/encoding/payloads/delete_payload.c
index 584e6f22b..3634cd36c 100644
--- a/src/libcharon/encoding/payloads/delete_payload.c
+++ b/src/libcharon/encoding/payloads/delete_payload.c
@@ -306,8 +306,12 @@ typedef struct {
} spi_enumerator_t;
METHOD(enumerator_t, spis_enumerate, bool,
- spi_enumerator_t *this, uint32_t *spi)
+ spi_enumerator_t *this, va_list args)
{
+ uint32_t *spi;
+
+ VA_ARGS_VGET(args, spi);
+
if (this->spis.len >= sizeof(*spi))
{
memcpy(spi, this->spis.ptr, sizeof(*spi));
@@ -328,7 +332,8 @@ METHOD(delete_payload_t, create_spi_enumerator, enumerator_t*,
}
INIT(e,
.public = {
- .enumerate = (void*)_spis_enumerate,
+ .enumerate = enumerator_enumerate_default,
+ .venumerate = _spis_enumerate,
.destroy = (void*)free,
},
.spis = this->spis,
diff --git a/src/libcharon/encoding/payloads/eap_payload.c b/src/libcharon/encoding/payloads/eap_payload.c
index 8c3fc5933..923135da9 100644
--- a/src/libcharon/encoding/payloads/eap_payload.c
+++ b/src/libcharon/encoding/payloads/eap_payload.c
@@ -270,8 +270,12 @@ typedef struct {
} type_enumerator_t;
METHOD(enumerator_t, enumerate_types, bool,
- type_enumerator_t *this, eap_type_t *type, uint32_t *vendor)
+ type_enumerator_t *this, va_list args)
{
+ eap_type_t *type;
+ uint32_t *vendor;
+
+ VA_ARGS_VGET(args, type, vendor);
this->offset = extract_type(this->payload, this->offset, type, vendor);
return this->offset;
}
@@ -289,7 +293,8 @@ METHOD(eap_payload_t, get_types, enumerator_t*,
{
INIT(enumerator,
.public = {
- .enumerate = (void*)_enumerate_types,
+ .enumerate = enumerator_enumerate_default,
+ .venumerate = _enumerate_types,
.destroy = (void*)free,
},
.payload = this,