summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2011-02-20 16:44:58 +0100
committerLinus Nordberg <linus@nordu.net>2011-02-20 16:44:58 +0100
commitc0c1280e0c8e1bc0692ad016890c2065c7f41d80 (patch)
tree2f9966033f9456775dd8cfe8ab6fc6fc7eb7a411
parent99a5d4fdb88e21a56843615511f16b164c7b770b (diff)
Push an ENOMEM error on the connection rather than the context.
-rw-r--r--lib/tls.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tls.c b/lib/tls.c
index 0b3580c..d9eb801 100644
--- a/lib/tls.c
+++ b/lib/tls.c
@@ -14,9 +14,9 @@
#include "../radsecproxy.h"
static struct tls *
-_get_tlsconf (struct rs_context *ctx, const struct rs_realm *realm)
+_get_tlsconf (struct rs_connection *conn, const struct rs_realm *realm)
{
- struct tls *c = rs_malloc (ctx, sizeof (struct tls));
+ struct tls *c = rs_malloc (conn->ctx, sizeof (struct tls));
if (c)
{
@@ -34,7 +34,7 @@ _get_tlsconf (struct rs_context *ctx, const struct rs_realm *realm)
c->policyoids = (char **) NULL; /* NYI */
}
else
- rs_err_ctx_push_fl (ctx, RSE_NOMEM, __FILE__, __LINE__, NULL);
+ rs_err_conn_push_fl (conn, RSE_NOMEM, __FILE__, __LINE__, NULL);
return c;
}
@@ -49,7 +49,7 @@ rs_tls_init (struct rs_connection *conn)
assert (conn->ctx);
ctx = conn->ctx;
- tlsconf = _get_tlsconf (ctx, conn->active_peer->realm);
+ tlsconf = _get_tlsconf (conn, conn->active_peer->realm);
if (!tlsconf)
return -1;
ssl_ctx = tlsgetctx (RADPROT_TLS, tlsconf);