insert IMV/IMC before providing BindFunction
This commit is contained in:
@@ -88,6 +88,7 @@ METHOD(imc_t, set_message_types, void,
|
||||
this->supported_types = malloc(size);
|
||||
memcpy(this->supported_types, supported_types, size);
|
||||
}
|
||||
DBG2(DBG_TNC, "IMC %u supports %u message types", this->id, type_count);
|
||||
}
|
||||
|
||||
METHOD(imc_t, type_supported, bool,
|
||||
|
||||
@@ -59,6 +59,9 @@ METHOD(imc_manager_t, add, bool,
|
||||
imc->get_name(imc));
|
||||
return FALSE;
|
||||
}
|
||||
this->imcs->insert_last(this->imcs, imc);
|
||||
this->next_imc_id++;
|
||||
|
||||
if (imc->provide_bind_function(imc->get_id(imc), TNC_TNCC_BindFunction)
|
||||
!= TNC_RESULT_SUCCESS)
|
||||
{
|
||||
@@ -66,8 +69,6 @@ METHOD(imc_manager_t, add, bool,
|
||||
imc->get_name(imc));
|
||||
return FALSE;
|
||||
}
|
||||
this->imcs->insert_last(this->imcs, imc);
|
||||
this->next_imc_id++;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user