From 58d82b289db469d336d518a0e13669ca30ed96f7 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Thu, 12 Jan 2017 16:15:58 +0000 Subject: If tls_set_cbs() fails an error will already be specified, so do not replace it with a less specific one. --- src/lib/libtls/tls_server.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/lib/libtls/tls_server.c') diff --git a/src/lib/libtls/tls_server.c b/src/lib/libtls/tls_server.c index a3883315e7..091dd7a153 100644 --- a/src/lib/libtls/tls_server.c +++ b/src/lib/libtls/tls_server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_server.c,v 1.31 2016/11/06 16:55:16 beck Exp $ */ +/* $OpenBSD: tls_server.c,v 1.32 2017/01/12 16:15:58 jsing Exp $ */ /* * Copyright (c) 2014 Joel Sing * @@ -357,10 +357,8 @@ tls_accept_cbs(struct tls *ctx, struct tls **cctx, if ((conn_ctx = tls_accept_common(ctx)) == NULL) goto err; - if (tls_set_cbs(conn_ctx, read_cb, write_cb, cb_arg) != 0) { - tls_set_errorx(ctx, "callback registration failure"); + if (tls_set_cbs(conn_ctx, read_cb, write_cb, cb_arg) != 0) goto err; - } *cctx = conn_ctx; -- cgit v1.2.3-55-g6feb