Skip to content

Commit

Permalink
fix dict_addattr call in rlm_sqlcounter
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Feb 14, 2014
1 parent ea46dd8 commit 1df8594
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/include/libradius.h
Expand Up @@ -417,7 +417,7 @@ int str2argv(char *str, char **argv, int max_argc);
int dict_str2oid(char const *ptr, unsigned int *pattr,
unsigned int *pvendor, int tlv_depth);
int dict_addvendor(char const *name, unsigned int value);
int dict_addattr(char const *name, int attr, unsigned int vendor, int type, ATTR_FLAGS flags);
int dict_addattr(char const *name, int attr, unsigned int vendor, PW_TYPE type, ATTR_FLAGS flags);
int dict_addvalue(char const *namestr, char const *attrstr, int value);
int dict_init(char const *dir, char const *fn);
void dict_free(void);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/dict.c
Expand Up @@ -632,7 +632,7 @@ const int dict_attr_allowed_chars[256] = {
/*
* Add an attribute to the dictionary.
*/
int dict_addattr(char const *name, int attr, unsigned int vendor, int type,
int dict_addattr(char const *name, int attr, unsigned int vendor, PW_TYPE type,
ATTR_FLAGS flags)
{
size_t namelen;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/rlm_sqlcounter/rlm_sqlcounter.c
Expand Up @@ -438,7 +438,7 @@ static int mod_instantiate(CONF_SECTION *conf, void *instance)
* Create a new attribute for the check item.
*/
rad_assert(inst->check_name && *inst->check_name);
dict_addattr(inst->check_name, 0, PW_TYPE_INTEGER, -1, flags);
dict_addattr(inst->check_name, -1, 0, PW_TYPE_INTEGER, flags);
da = dict_attrbyname(inst->check_name);
if (!da) {
cf_log_err_cs(conf, "Failed to create check attribute %s", inst->check_name);
Expand Down

0 comments on commit 1df8594

Please sign in to comment.