# HG changeset patch # User Thomas Klausner # Date 1367232232 -7200 # Node ID 56bf0377e2ff9500ccd5a08f47d534d4c6085c86 # Parent be24c7453aa6e63559d9e5f174d31b820f4448de Raise "Conflicting rules" to error level since it causes validation errors and usually will stop a message from being accepted or sent. diff -r be24c7453aa6 -r 56bf0377e2ff libfdproto/messages.c --- a/libfdproto/messages.c Mon Apr 29 17:42:03 2013 +0800 +++ b/libfdproto/messages.c Mon Apr 29 12:43:52 2013 +0200 @@ -2351,7 +2351,7 @@ min = 1; } if (count < min) { - TRACE_DEBUG(INFO, "Conflicting rule: the number of occurences (%d) is < the rule min (%d) for '%s'.", count, min, avp_name); + fd_log_error("Conflicting rule: the number of occurences (%d) is < the rule min (%d) for '%s'.", count, min, avp_name); if (pr_data->pei) { pr_data->pei->pei_errcode = "DIAMETER_MISSING_AVP"; pr_data->pei->pei_avp = empty_avp(rule->rule_avp); @@ -2361,7 +2361,7 @@ /* Check the "max" value */ if ((rule->rule_max != -1) && (count > rule->rule_max)) { - TRACE_DEBUG(INFO, "Conflicting rule: the number of occurences (%d) is > the rule max (%d) for '%s'.", count, rule->rule_max, avp_name); + fd_log_error("Conflicting rule: the number of occurences (%d) is > the rule max (%d) for '%s'.", count, rule->rule_max, avp_name); if (pr_data->pei) { if (rule->rule_max == 0) pr_data->pei->pei_errcode = "DIAMETER_AVP_NOT_ALLOWED"; @@ -2382,7 +2382,7 @@ case RULE_FIXED_HEAD: /* Since "0*1" is a valid rule specifier, we only reject cases where the AVP appears *after* its fixed position */ if (first > rule->rule_order) { - TRACE_DEBUG(INFO, "Conflicting rule: the FIXED_HEAD AVP appears first in (%d) position, the rule requires (%d) for '%s'.", first, rule->rule_order, avp_name); + fd_log_error("Conflicting rule: the FIXED_HEAD AVP appears first in (%d) position, the rule requires (%d) for '%s'.", first, rule->rule_order, avp_name); if (pr_data->pei) { pr_data->pei->pei_errcode = "DIAMETER_MISSING_AVP"; pr_data->pei->pei_message = "AVP was not in its fixed position"; @@ -2395,7 +2395,7 @@ case RULE_FIXED_TAIL: /* Since "0*1" is a valid rule specifier, we only reject cases where the AVP appears *before* its fixed position */ if (last > rule->rule_order) { /* We have a ">" here because we count in reverse order (i.e. from the end) */ - TRACE_DEBUG(INFO, "Conflicting rule: the FIXED_TAIL AVP appears last in (%d) position, the rule requires (%d) for '%s'.", last, rule->rule_order, avp_name); + fd_log_error("Conflicting rule: the FIXED_TAIL AVP appears last in (%d) position, the rule requires (%d) for '%s'.", last, rule->rule_order, avp_name); if (pr_data->pei) { pr_data->pei->pei_errcode = "DIAMETER_MISSING_AVP"; pr_data->pei->pei_message = "AVP was not in its fixed position";