summaryrefslogtreecommitdiff
path: root/lib/attr.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2013-05-15 15:39:20 +0200
committerLinus Nordberg <linus@nordberg.se>2013-05-15 15:39:20 +0200
commitf8207d6d51b665d6af54262c593372dd73eae0d0 (patch)
tree2cb6ac122f8566566ca9bfb4efd5b0e4c1eddbfb /lib/attr.c
parentfba1c7d1a6418221a94965d0431bf7df0a9a74a0 (diff)
parent65b62d83ee72012d1171f1813b8f989f8805497c (diff)
Merge branch 'libradsec' into libradsec-server-support
Conflicts: lib/HACKING lib/Makefile.am lib/README lib/compat.h lib/conf.c lib/configure.ac lib/conn.c lib/conn.h lib/err.c lib/err.h lib/event.c lib/event.h lib/examples/Makefile.am lib/examples/client-blocking.c lib/examples/client.conf lib/include/radsec/radsec-impl.h lib/include/radsec/radsec.h lib/include/radsec/request-impl.h lib/include/radsec/request.h lib/packet.c lib/packet.h lib/peer.c lib/peer.h lib/request.c lib/send.c lib/tcp.c lib/tests/Makefile.am lib/tls.c lib/udp.c lib/util.c
Diffstat (limited to 'lib/attr.c')
-rw-r--r--lib/attr.c48
1 files changed, 0 insertions, 48 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);
-}