get_attribute() and set_attribute() are not allowed to use TNC_CONNECTIONID_ANY

This commit is contained in:
Andreas Steffen
2010-11-16 22:43:48 +01:00
parent 04b132e088
commit 66c30fa244
+5 -3
View File
@@ -308,7 +308,8 @@ METHOD(tnccs_manager_t, get_attribute, TNC_Result,
tnccs_connection_entry_t *entry;
recommendations_t *recs = NULL;
if (attribute_id != TNC_ATTRIBUTEID_PREFERRED_LANGUAGE)
if (id == TNC_CONNECTIONID_ANY ||
attribute_id != TNC_ATTRIBUTEID_PREFERRED_LANGUAGE)
{
return TNC_RESULT_INVALID_PARAMETER;
}
@@ -356,8 +357,9 @@ METHOD(tnccs_manager_t, set_attribute, TNC_Result,
tnccs_connection_entry_t *entry;
recommendations_t *recs = NULL;
if (attribute_id != TNC_ATTRIBUTEID_REASON_STRING &&
attribute_id != TNC_ATTRIBUTEID_REASON_LANGUAGE)
if (id == TNC_CONNECTIONID_ANY ||
(attribute_id != TNC_ATTRIBUTEID_REASON_STRING &&
attribute_id != TNC_ATTRIBUTEID_REASON_LANGUAGE))
{
return TNC_RESULT_INVALID_PARAMETER;
}