Added os_info support to HCD IMC
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user