From 27af20f16848236ff1a4a0f748fa8ed083130b55 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 13 Aug 2017 22:53:23 +0200 Subject: [PATCH] Don't accept channels if we set channel_accept_cb to NULL. --- src/meshlink.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/meshlink.c b/src/meshlink.c index 21144c32..35b00482 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -2146,8 +2146,9 @@ meshlink_edge_t **meshlink_get_all_edges_state(meshlink_handle_t *mesh, meshlink } static bool channel_pre_accept(struct utcp *utcp, uint16_t port) { - //TODO: implement - return true; + node_t *n = utcp->priv; + meshlink_handle_t *mesh = n->mesh; + return mesh->channel_accept_cb; } static ssize_t channel_recv(struct utcp_connection *connection, const void *data, size_t len) { -- 2.39.5