aboutsummaryrefslogtreecommitdiffstats
path: root/src/libimcv/plugins
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2015-05-27 10:19:31 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2015-08-18 21:25:38 +0200
commit9c2e0a50a3e6333649a4b2c789f2984e4b1ac60e (patch)
treec7291868e027d333f214f77e77e7e11db22efbba /src/libimcv/plugins
parent9e88bb987d65e41aa1a86086f300f7177cac721d (diff)
downloadstrongswan-9c2e0a50a3e6333649a4b2c789f2984e4b1ac60e.tar.bz2
strongswan-9c2e0a50a3e6333649a4b2c789f2984e4b1ac60e.tar.xz
Added os_info support to HCD IMC
Diffstat (limited to 'src/libimcv/plugins')
-rw-r--r--src/libimcv/plugins/imc_hcd/imc_hcd.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libimcv/plugins/imc_hcd/imc_hcd.c b/src/libimcv/plugins/imc_hcd/imc_hcd.c
index 35badebbe..cdea22041 100644
--- a/src/libimcv/plugins/imc_hcd/imc_hcd.c
+++ b/src/libimcv/plugins/imc_hcd/imc_hcd.c
@@ -17,6 +17,7 @@
#include <imc/imc_agent.h>
#include <imc/imc_msg.h>
+#include <imc/imc_os_info.h>
#include <generic/generic_attr_bool.h>
#include <generic/generic_attr_chunk.h>
#include <generic/generic_attr_string.h>
@@ -39,6 +40,7 @@ static pen_type_t msg_types[] = {
};
static imc_agent_t *imc_hcd;
+static imc_os_info_t *os;
typedef struct quadruple_t quadruple_t;
@@ -82,6 +84,15 @@ TNC_Result TNC_IMC_API TNC_IMC_Initialize(TNC_IMCID imc_id,
return TNC_RESULT_FATAL;
}
+ os = imc_os_info_create();
+ if (!os)
+ {
+ imc_hcd->destroy(imc_hcd);
+ imc_hcd = NULL;
+
+ return TNC_RESULT_FATAL;
+ }
+
if (min_version > TNC_IFIMC_VERSION_1 || max_version < TNC_IFIMC_VERSION_1)
{
DBG1(DBG_IMC, "no common IF-IMC version");
@@ -696,6 +707,9 @@ TNC_Result TNC_IMC_API TNC_IMC_Terminate(TNC_IMCID imc_id)
imc_hcd->destroy(imc_hcd);
imc_hcd = NULL;
+ os->destroy(os);
+ os = NULL;
+
return TNC_RESULT_SUCCESS;
}