imc/imv->send_message() uses attr_list
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#include <tncif_names.h>
|
||||
|
||||
#include <debug.h>
|
||||
#include <utils/linked_list.h>
|
||||
#include <threading/rwlock.h>
|
||||
|
||||
typedef struct private_imc_agent_t private_imc_agent_t;
|
||||
@@ -453,11 +452,14 @@ METHOD(imc_agent_t, get_state, bool,
|
||||
|
||||
METHOD(imc_agent_t, send_message, TNC_Result,
|
||||
private_imc_agent_t *this, TNC_ConnectionID connection_id, bool excl,
|
||||
TNC_UInt32 src_imc_id, TNC_UInt32 dst_imv_id, chunk_t msg)
|
||||
TNC_UInt32 src_imc_id, TNC_UInt32 dst_imv_id, linked_list_t *attr_list)
|
||||
{
|
||||
TNC_MessageType type;
|
||||
TNC_UInt32 msg_flags;
|
||||
imc_state_t *state;
|
||||
pa_tnc_attr_t *attr;
|
||||
pa_tnc_msg_t *pa_tnc_msg;
|
||||
chunk_t msg;
|
||||
|
||||
state = find_connection(this, connection_id);
|
||||
if (!state)
|
||||
@@ -467,6 +469,15 @@ METHOD(imc_agent_t, send_message, TNC_Result,
|
||||
return TNC_RESULT_FATAL;
|
||||
}
|
||||
|
||||
pa_tnc_msg = pa_tnc_msg_create();
|
||||
|
||||
while (attr_list->remove_first(attr_list, (void**)&attr) == SUCCESS)
|
||||
{
|
||||
pa_tnc_msg->add_attribute(pa_tnc_msg, attr);
|
||||
}
|
||||
pa_tnc_msg->build(pa_tnc_msg);
|
||||
msg = pa_tnc_msg->get_encoding(pa_tnc_msg);
|
||||
|
||||
if (state->has_long(state) && this->send_message_long)
|
||||
{
|
||||
if (!src_imc_id)
|
||||
|
||||
Reference in New Issue
Block a user