summaryrefslogtreecommitdiff
path: root/lib/radsec.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2011-02-28 11:46:14 +0100
committerLinus Nordberg <linus@nordu.net>2011-02-28 11:46:14 +0100
commit9e601f905d91f55c7a36f15fe5998d694c38444f (patch)
treed01ef4bbdafa4185517a4ca86cce2ac30213a7f4 /lib/radsec.c
parent2befa02ee876e83a8f8849388e61250e74d75eaf (diff)
API changes: rs_client* --> rs_peer.
Move peer (former server) things to new file peer.c. Update examples.
Diffstat (limited to 'lib/radsec.c')
-rw-r--r--lib/radsec.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/lib/radsec.c b/lib/radsec.c
index c821566..b9c9e35 100644
--- a/lib/radsec.c
+++ b/lib/radsec.c
@@ -149,65 +149,3 @@ int rs_context_set_alloc_scheme(struct rs_context *ctx,
return rs_err_ctx_push_fl (ctx, RSE_NOSYS, __FILE__, __LINE__,
"%s: NYI", __func__);
}
-
-int
-rs_server_create (struct rs_connection *conn, struct rs_peer **server)
-{
- struct rs_peer *srv;
-
- srv = _rs_peer_create (conn->ctx, &conn->peers);
- if (srv)
- {
- srv->conn = conn;
- srv->realm->timeout = 2;
- srv->realm->retries = 2;
- }
- else
- return rs_err_conn_push_fl (conn, RSE_NOMEM, __FILE__, __LINE__, NULL);
- if (*server)
- *server = srv;
- return RSE_OK;
-}
-
-int
-rs_server_set_address (struct rs_peer *server, const char *hostname,
- const char *service)
-{
- struct rs_error *err;
-
- assert (server);
- assert (server->realm);
-
- err = _rs_resolv (&server->addr, server->realm->type, hostname, service);
- if (err)
- return _rs_err_conn_push_err (server->conn, err);
- return RSE_OK;
-}
-
-void
-rs_server_set_timeout (struct rs_peer *server, int timeout)
-{
- assert (server);
- assert (server->realm);
- server->realm->timeout = timeout;
-}
-void
-rs_server_set_retries (struct rs_peer *server, int retries)
-{
- assert (server);
- assert (server->realm);
- server->realm->retries = retries;
-}
-
-int
-rs_server_set_secret (struct rs_peer *server, const char *secret)
-{
- if (server->secret)
- free (server->secret);
- server->secret = (char *) malloc (strlen(secret) + 1);
- if (!server->secret)
- return rs_err_conn_push (server->conn, RSE_NOMEM, NULL);
- strcpy (server->secret, secret);
- return RSE_OK;
-}
-