From: Guus Sliepen Date: Sun, 13 Aug 2017 20:53:23 +0000 (+0200) Subject: Don't accept channels if we set channel_accept_cb to NULL. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=27af20f16848236ff1a4a0f748fa8ed083130b55;p=meshlink Don't accept channels if we set channel_accept_cb to NULL. --- 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) {