Skip to content

Commit

Permalink
Mark up auto-numbered attributes as internal
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Nov 19, 2015
1 parent 2caea4c commit 6de179a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/dict.c
Expand Up @@ -609,9 +609,12 @@ int fr_dict_attr_add(fr_dict_t *dict, fr_dict_attr_t const *parent,
if (attr == -1) {
if (fr_dict_attr_by_name(dict, name)) return 0; /* exists, don't add it again */
attr = ++max_attr;
flags.internal = 1;

} else if (attr <= 0) {
fr_strerror_printf("ATTRIBUTE number %i is invalid, must be greater than zero", attr);
goto error;

} else if ((unsigned int) attr > max_attr) {
max_attr = attr;
}
Expand Down

0 comments on commit 6de179a

Please sign in to comment.