From: Guus Sliepen Date: Thu, 27 Jul 2017 09:03:09 +0000 (+0200) Subject: Don't call abort() when no channel receive callback is set. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=e2cae2e00c821190a72c227c27fc37b8b3ab35f8;p=meshlink Don't call abort() when no channel receive callback is set. --- 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) {