aboutsummaryrefslogtreecommitdiffstats
path: root/src/libimcv/plugins/imc_test/imc_test.c
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2012-08-20 22:37:08 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2012-08-20 22:37:08 +0200
commitdbb7859f9f3a82da2c379d7f257a6810540e4dd8 (patch)
treebe6f7a5d9502e85f1ff401c4661037c6b869daf2 /src/libimcv/plugins/imc_test/imc_test.c
parent88a5abf5e202b4aedae85a7891b759fe15b6198a (diff)
downloadstrongswan-dbb7859f9f3a82da2c379d7f257a6810540e4dd8.tar.bz2
strongswan-dbb7859f9f3a82da2c379d7f257a6810540e4dd8.tar.xz
define pen_type_t as a vendor-specific type
Diffstat (limited to 'src/libimcv/plugins/imc_test/imc_test.c')
-rw-r--r--src/libimcv/plugins/imc_test/imc_test.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libimcv/plugins/imc_test/imc_test.c b/src/libimcv/plugins/imc_test/imc_test.c
index 39442c3e8..bc2a233f6 100644
--- a/src/libimcv/plugins/imc_test/imc_test.c
+++ b/src/libimcv/plugins/imc_test/imc_test.c
@@ -257,6 +257,7 @@ static TNC_Result receive_message(TNC_IMCID imc_id,
{
pa_tnc_msg_t *pa_tnc_msg;
pa_tnc_attr_t *attr;
+ pen_type_t attr_type;
imc_state_t *state;
enumerator_t *enumerator;
TNC_Result result;
@@ -291,11 +292,13 @@ static TNC_Result receive_message(TNC_IMCID imc_id,
enumerator = pa_tnc_msg->create_attribute_enumerator(pa_tnc_msg);
while (enumerator->enumerate(enumerator, &attr))
{
- if (attr->get_vendor_id(attr) != PEN_ITA)
+ attr_type = attr->get_type(attr);
+
+ if (attr_type.vendor_id != PEN_ITA)
{
continue;
}
- if (attr->get_type(attr) == ITA_ATTR_COMMAND)
+ if (attr_type.type == ITA_ATTR_COMMAND)
{
ita_attr_command_t *ita_attr;
@@ -303,7 +306,7 @@ static TNC_Result receive_message(TNC_IMCID imc_id,
DBG1(DBG_IMC, "received command '%s'",
ita_attr->get_command(ita_attr));
}
- else if (attr->get_type(attr) == ITA_ATTR_DUMMY)
+ else if (attr_type.type == ITA_ATTR_DUMMY)
{
ita_attr_dummy_t *ita_attr;