From e2cae2e00c821190a72c227c27fc37b8b3ab35f8 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 27 Jul 2017 11:03:09 +0200 Subject: [PATCH] Don't call abort() when no channel receive callback is set. --- src/meshlink.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/meshlink.c b/src/meshlink.c index 1771202f..a69b3851 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -2163,12 +2163,9 @@ static ssize_t channel_recv(struct utcp_connection *connection, const void *data abort(); node_t *n = channel->node; meshlink_handle_t *mesh = n->mesh; - if(!channel->receive_cb) - return -1; - else { + if(channel->receive_cb) channel->receive_cb(mesh, channel, data, len); - return len; - } + return len; } static void channel_accept(struct utcp_connection *utcp_connection, uint16_t port) { -- 2.39.2