Make sure libstrongswan is initialized first in IMCs and IMVs
This commit is contained in:
@@ -779,6 +779,14 @@ imv_agent_if_t *imv_os_agent_create(const char *name, TNC_IMVID id,
|
||||
TNC_Version *actual_version)
|
||||
{
|
||||
private_imv_os_agent_t *this;
|
||||
imv_agent_t *agent;
|
||||
|
||||
agent = imv_agent_create(name, msg_types, countof(msg_types), id,
|
||||
actual_version);
|
||||
if (!agent)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
INIT(this,
|
||||
.public = {
|
||||
@@ -790,16 +798,10 @@ imv_agent_if_t *imv_os_agent_create(const char *name, TNC_IMVID id,
|
||||
.solicit_recommendation = _solicit_recommendation,
|
||||
.destroy = _destroy,
|
||||
},
|
||||
.agent = imv_agent_create(name, msg_types, countof(msg_types), id,
|
||||
actual_version),
|
||||
.agent = agent,
|
||||
.db = imv_os_database_create(imcv_db),
|
||||
);
|
||||
|
||||
if (!this->agent)
|
||||
{
|
||||
destroy(this);
|
||||
return NULL;
|
||||
}
|
||||
return &this->public;
|
||||
}
|
||||
|
||||
|
||||
@@ -296,6 +296,14 @@ imv_agent_if_t *imv_test_agent_create(const char *name, TNC_IMVID id,
|
||||
TNC_Version *actual_version)
|
||||
{
|
||||
private_imv_test_agent_t *this;
|
||||
imv_agent_t *agent;
|
||||
|
||||
agent = imv_agent_create(name, msg_types, countof(msg_types), id,
|
||||
actual_version);
|
||||
if (!agent)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
INIT(this,
|
||||
.public = {
|
||||
@@ -307,15 +315,9 @@ imv_agent_if_t *imv_test_agent_create(const char *name, TNC_IMVID id,
|
||||
.solicit_recommendation = _solicit_recommendation,
|
||||
.destroy = _destroy,
|
||||
},
|
||||
.agent = imv_agent_create(name, msg_types, countof(msg_types), id,
|
||||
actual_version),
|
||||
.agent = agent,
|
||||
);
|
||||
|
||||
if (!this->agent)
|
||||
{
|
||||
destroy(this);
|
||||
return NULL;
|
||||
}
|
||||
return &this->public;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user