diff options
author | Linus Nordberg <linus@nordberg.se> | 2013-05-08 12:00:00 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2013-05-08 17:04:32 +0200 |
commit | 25261df09d801d070df4c31e11e1702614546090 (patch) | |
tree | f5274142890575c7802c60bd02001428a1143121 | |
parent | 0a3ac2ab74778832966237b6a3e488cb8d627ec4 (diff) |
Remove an unused error code and unusued RSE_MAX.
Also, remove unused file attr.c.
-rw-r--r-- | lib/attr.c | 48 | ||||
-rw-r--r-- | lib/include/radsec/radsec.h | 2 |
2 files changed, 0 insertions, 50 deletions
diff --git a/lib/attr.c b/lib/attr.c deleted file mode 100644 index 74d352c..0000000 --- a/lib/attr.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright 2010, 2011 NORDUnet A/S. All rights reserved. - See LICENSE for licensing information. */ - -/* NOTE: This file is not in use at the moment (libradsec-0.0.1). */ - -#if defined HAVE_CONFIG_H -#include <config.h> -#endif - -#include <radius/client.h> -#include <radsec/radsec.h> -#include <radsec/radsec-impl.h> - -int -rs_attr_create(struct rs_connection *conn, - struct rs_attr **attr, - const char *type, - const char *val) -{ - VALUE_PAIR *vp; - struct rs_attr *a; - - *attr = NULL; - a = (struct rs_attr *) malloc (sizeof(struct rs_attr)); - if (!a) - return rs_err_conn_push_fl (conn, RSE_NOMEM, __FILE__, __LINE__, NULL); - memset (a, 0, sizeof(struct rs_attr)); - - vp = pairmake (type, val, T_OP_EQ); - if (!vp) - { - rs_attr_destroy (a); - return rs_err_conn_push_fl (conn, RSE_FR, __FILE__, __LINE__, - "pairmake: %s", fr_strerror ()); - } - - a->vp = vp; - *attr = a; - return RSE_OK; -} - -void -rs_attr_destroy (struct rs_attr *attr) -{ - if (attr->vp) - pairfree (&attr->vp); - free (attr); -} diff --git a/lib/include/radsec/radsec.h b/lib/include/radsec/radsec.h index 2d20b6e..00c8d7b 100644 --- a/lib/include/radsec/radsec.h +++ b/lib/include/radsec/radsec.h @@ -29,7 +29,6 @@ enum rs_error_code { RSE_INVALID_CTX = 3, RSE_INVALID_CONN = 4, RSE_CONN_TYPE_MISMATCH = 5, - RSE_FR = 6, RSE_BADADDR = 7, RSE_NOPEER = 8, RSE_EVENT = 9, /* libevent error. */ @@ -68,7 +67,6 @@ enum rs_error_code { RSE_VENDOR_UNKNOWN = 42, RSE_CRED = 43, RSE_CERT = 44, - RSE_MAX = RSE_CERT }; enum rs_conn_type { |