diff options
author | Luke Howard <lukeh@padl.com> | 2011-11-13 17:16:14 +1100 |
---|---|---|
committer | Luke Howard <lukeh@padl.com> | 2011-11-14 12:33:38 +1100 |
commit | a13cddc1331aa1f5e7dca7d1b44482951d2757bf (patch) | |
tree | 2d3b1d48a093af7408034c86d8d38b2c0129f404 /lib/radius/dict.c | |
parent | 7ec93ff9e4d979e4bbcf33f9c90c94dc9d3cdba9 (diff) |
port to new RADIUS client library
Diffstat (limited to 'lib/radius/dict.c')
-rw-r--r-- | lib/radius/dict.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/radius/dict.c b/lib/radius/dict.c index 26fe7d0..fc04ee2 100644 --- a/lib/radius/dict.c +++ b/lib/radius/dict.c @@ -25,7 +25,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <networkradius-devel/client.h> +#include "client.h" #include <ctype.h> /** \file dict.c @@ -56,7 +56,7 @@ const DICT_ATTR *nr_dict_attr_byvalue(unsigned int attr, unsigned int vendor) return &nr_dict_attrs[half]; } - if ((vendor > nr_dict_attrs[half].vendor) && + if ((vendor >= nr_dict_attrs[half].vendor) && (attr > nr_dict_attrs[half].attr)) { start = half + 1; } else { @@ -100,19 +100,19 @@ const DICT_ATTR *nr_dict_attr_byname(const char *name) int nr_dict_attr_2struct(DICT_ATTR *da, unsigned int attr, unsigned int vendor, char *buffer, size_t bufsize) { - if (!da || !buffer) return -NR_ERR_INVALID_ARG; + if (!da || !buffer) return -RSE_INVAL; if (!vendor) { - if (attr > 256) return -NR_ERR_INVALID_ARG; + if (attr > 256) return -RSE_INVAL; } else if (vendor > (1 << 24)) { - return -NR_ERR_INVALID_ARG; + return -RSE_INVAL; } memset(da, 0, sizeof(*da)); da->attr = attr; da->flags.unknown = 1; - da->type = NR_TYPE_OCTETS; + da->type = RS_TYPE_OCTETS; da->vendor = vendor; if (da->vendor) { |