]> git.meshlink.io Git - meshlink/commitdiff
Don't accept channels if we set channel_accept_cb to NULL.
authorGuus Sliepen <guus@meshlink.io>
Sun, 13 Aug 2017 20:53:23 +0000 (22:53 +0200)
committerGuus Sliepen <guus@meshlink.io>
Sun, 13 Aug 2017 20:53:23 +0000 (22:53 +0200)
src/meshlink.c

index 21144c32ff6f58a67752e578f29bf819f8f637e1..35b00482b08c6fedbf176aafb4ca77de305de8c4 100644 (file)
@@ -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) {