Skip to content

Commit

Permalink
remove tmpl_names it was a less complete duplicate of template names
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Nov 25, 2014
1 parent 37df939 commit 8862c32
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/include/tmpl.h
Expand Up @@ -84,7 +84,7 @@ typedef enum tmpl_type {
TMPL_TYPE_NULL //!< VPT has no value
} tmpl_type_t;

extern const FR_NAME_NUMBER tmpl_types[];
extern const FR_NAME_NUMBER template_names[];

typedef struct xlat_exp xlat_exp_t;

Expand Down
2 changes: 1 addition & 1 deletion src/main/evaluate.c
Expand Up @@ -41,7 +41,7 @@ FR_NAME_NUMBER const template_names[] = {
{ "literal", TMPL_TYPE_LITERAL },
{ "xlat", TMPL_TYPE_XLAT },
{ "attr", TMPL_TYPE_ATTR },
{ "unknonwn attr", TMPL_TYPE_ATTR_UNDEFINED },
{ "unknown attr", TMPL_TYPE_ATTR_UNDEFINED },
{ "list", TMPL_TYPE_LIST },
{ "regex", TMPL_TYPE_REGEX },
{ "exec", TMPL_TYPE_EXEC },
Expand Down
10 changes: 0 additions & 10 deletions src/main/pair.c
Expand Up @@ -34,16 +34,6 @@ RCSID("$Id$")
#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/rad_assert.h>

const FR_NAME_NUMBER tmpl_types[] = {
{"unknown", TMPL_TYPE_UNKNOWN },
{"literal", TMPL_TYPE_LITERAL },
{"expanded", TMPL_TYPE_XLAT },
{"attribute ref", TMPL_TYPE_ATTR },
{"list", TMPL_TYPE_LIST },
{"exec", TMPL_TYPE_EXEC },
{"value-pair-data", TMPL_TYPE_DATA }
};

struct cmp {
DICT_ATTR const *attribute;
DICT_ATTR const *from;
Expand Down
2 changes: 1 addition & 1 deletion src/main/tmpl.c
Expand Up @@ -436,7 +436,7 @@ void tmpl_verify(char const *file, int line, value_pair_tmpl_t const *vpt)

if (vpt->type > TMPL_TYPE_NULL) {
FR_FAULT_LOG("CONSISTENCY CHECK FAILED %s[%u]: value_pair_tmpl_t type was %i "
"(outside range of TMPL_TYPEs)", file, line, vpt->type);
"(outside range of template_names)", file, line, vpt->type);
fr_assert(0);
fr_exit_now(1);
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/rlm_cache/rlm_cache.c
Expand Up @@ -387,7 +387,7 @@ static int cache_verify(value_pair_map_t *map, UNUSED void *ctx)
default:
cf_log_err(map->ci, "Operator \"%s\" not allowed for %s values",
fr_int2str(fr_tokens, map->op, "<INVALID>"),
fr_int2str(tmpl_types, map->rhs->type, "<INVALID>"));
fr_int2str(template_names, map->rhs->type, "<INVALID>"));
return -1;
}
default:
Expand Down
8 changes: 4 additions & 4 deletions src/modules/rlm_ldap/attrmap.c
Expand Up @@ -141,8 +141,8 @@ int rlm_ldap_map_verify(value_pair_map_t *map, void *instance)
break;

default:
cf_log_err(map->ci, "RADIUS (RHS) of map must be an attribute or list, not %s",
fr_int2str(tmpl_types, map->lhs->type, "<INVALID>"));
cf_log_err(map->ci, "Left hand side of map must be an attribute or list, not a %s",
fr_int2str(template_names, map->lhs->type, "<INVALID>"));
return -1;
}

Expand All @@ -158,8 +158,8 @@ int rlm_ldap_map_verify(value_pair_map_t *map, void *instance)
break;

default:
cf_log_err(map->ci, "LDAP (LHS) of map must be an xlat, attribute, exec, or literal, not %s",
fr_int2str(tmpl_types, map->rhs->type, "<INVALID>"));
cf_log_err(map->ci, "Right hand side of map must be an xlat, attribute, exec, or literal, not a %s",
fr_int2str(template_names, map->rhs->type, "<INVALID>"));
return -1;
}

Expand Down

0 comments on commit 8862c32

Please sign in to comment.